2

Python爬虫编程思想(50):编写第一个Beautiful Soup程序

 2 years ago
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.
neoserver,ios ssh client

1. 选择解析器

        由于Beautiful Soup底层需要依赖于解析器,所以在使用Beautiful Soup时需要为其指定解析器,Beautiful Soup支持多种解析器,包括Python标准库中的HTML解析器、还包括一些第三方的解析器,如lxml。表1列出了Beautiful Soup支持的解析器。

表1 Beautiful Soup支持的解析器


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK