

Python爬虫编程思想(69): 项目实战--抓取当当图书排行榜
source link: https://blog.csdn.net/nokiaguy/article/details/121220439
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.

Python爬虫编程思想(69): 项目实战--抓取当当图书排行榜
本文会使用requests抓取当当图书排行榜的HTML代码,并使用pyquery和CSS选择器分析HTML代码,提取出我们感兴趣的信息,最后会将提出的信息输出到Console上。
本例抓取与Python相关的图书排行榜,所以可以在当当首页(http://www.dangdang.com)输入Python来搜索与Python相关的图书,得到的URL如下:
http://search.dangdang.com/?key=python&act=input&sort_type=sort_default
搜索出的与Python相关图书如图1所示。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK