主要任务

获取音乐网站排名上升的歌曲

具体步骤

通过元素定位发现歌曲的信息被保存在li标签里

python selenium项目实战之获取排名上升的歌曲
通过往上寻找可以找到它的上级id标签songListWrapper
python selenium项目实战之获取排名上升的歌曲
通过id 和 li 可以获取歌曲信息
python selenium项目实战之获取排名上升的歌曲
可以通过sonlist里面的li标签循环遍历歌曲的名称和信息
通过条件筛选就可以获得歌曲上升的信息了

python selenium项目实战之获取排名上升的歌曲
通过属性class定位

python selenium项目实战之获取排名上升的歌曲
可以得到最后的结果
python selenium项目实战之获取排名上升的歌曲

相关文章:

  • 2021-08-06
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-01-01
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2021-10-09
  • 2021-11-23
  • 2022-12-23
  • 2022-01-15
  • 2021-08-06
  • 2021-09-24
  • 2021-04-02
相关资源
相似解决方案