8

Python爬虫编程思想(62): 项目实战:抓取酷狗网络红歌榜

 3 years ago
source link: https://blog.csdn.net/nokiaguy/article/details/121055895
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

Python爬虫编程思想(62): 项目实战:抓取酷狗网络红歌榜

        本文的案例会使用requests抓取酷狗的网络红歌榜,并使用Beautiful Soup库的CSS选择器分析抓取到的HTML代码,并将提取的信息显示在Console上。

首先在Chrome浏览器中使用下面的URL打开网络红歌榜页面。

https://www.kugou.com/yy/rank/home/1- 23784.html?from=rank

页面效果如图1所示。

        网络红歌榜页面下方并没有用于切换页面的数字导航条,不过从URL的样子可以尝试一下,例如1-


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK