반응형
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
반응형
'스크립트' 카테고리의 다른 글
[python] 로또 번호 생성기 (0) | 2023.03.07 |
---|---|
What Is My IP?(myip) (0) | 2023.02.03 |
[코딩테스트 입문] n의 배수 고르기 (0) | 2022.12.02 |
[코딩테스트 입문] 자릿수 더하기 (0) | 2022.12.02 |
[코딩테스트 입문] 짝수와 홀수 (0) | 2022.11.30 |