

Python爬虫编程思想(50):编写第一个Beautiful Soup程序
source link: https://blog.csdn.net/nokiaguy/article/details/120692402
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

1. 选择解析器
由于Beautiful Soup底层需要依赖于解析器,所以在使用Beautiful Soup时需要为其指定解析器,Beautiful Soup支持多种解析器,包括Python标准库中的HTML解析器、还包括一些第三方的解析器,如lxml。表1列出了Beautiful Soup支持的解析器。
表1 Beautiful Soup支持的解析器
Recommend
-
6
Python爬虫编程思想(49):Beautiful Soup环境搭建
-
19
Python爬虫编程思想(51):使用Beautiful Soup选择节点 ...
-
3
Python爬虫编程思想(52):使用Beautiful Soup选择子节点 ...
-
5
Python爬虫编程思想(53):使用Beautiful Soup选择父节点 ...
-
6
Python爬虫编程思想(54):使用Beautiful Soup选择兄弟节点 ...
-
6
Python爬虫编程思想(56):Beautiful Soup方法选择器之find方法 ...
-
11
Python爬虫编程思想(55):Beautiful Soup方法选择器之find_all方法 ...
-
7
Python爬虫编程思想(57): Beautiful Soup中CSS选择器的基本用法 ...
-
5
Python爬虫编程思想(59): 用Beautiful Soup CSS选择器获取属性值与文本 ...
-
4
Python爬虫编程思想(58): 用Beautiful Soup CSS选择器嵌套选择节点 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK