- 博客(3)
- 收藏
- 关注
原创 BeautifulSoup的使用--微博热搜榜
import requests import re from bs4 import BeautifulSoup url = "https://s.weibo.com/top/summary" resp = requests.get(url) # print(resp.text) html = BeautifulSoup(resp.text, "html.parser") data = html.find("div", class_="data", id="pl_top_realtimehot") # .
2021-08-07 10:10:47
206
原创 selenium 酷狗音乐搜索歌曲播放
from selenium.webdriver import Chrome from selenium.webdriver.common.keys import Keys import time web = Chrome() web.get("https://www.kugou.com/") # 找到某个元素点击 el = web.find_element_by_xpath('/html/body/div[1]/div[2]/div/ul[1]/li[2]/a') el.click() # 点击事件.
2021-08-06 14:26:47
312
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人