본문 바로가기

스크립트

[스크립트] python beautifulsoup4

반응형

python beautifulsoup4

 

beautifulsoup parser(파서)

Parser Typical usage Advantages Disadvantages
Python’s html.parser BeautifulSoup(markup, "html.parser") - Batteries included
- Decent speed
- Lenient (As of Python 3.2)
- Not as fast as lxml, less lenient than html5lib.
lxml’s HTML parser BeautifulSoup(markup, "lxml") - Very fast
- Lenient
- External C dependency
lxml’s XML parser BeautifulSoup(markup, "lxml-xml") 
BeautifulSoup(markup, "xml")
- Very fast
- The only currently supported XML parser
- External C dependency
html5lib BeautifulSoup(markup, "html5lib") - Extremely lenient
- Parses pages the same way a web browser does
- Creates valid HTML5
- Very slow
- External Python dependency

출처-https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser

 

 

 

 

참고URL

- pypi beautifulsoup4 : https://pypi.org/project/beautifulsoup4/

- Beautiful Soup Documentation : https://www.crummy.com/software/BeautifulSoup/bs4/doc/

 

728x90
반응형