import requests from bs4 import BeautifulSoup headers={ "User-Agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36 Edg/120.0.0.0" } response=requests.get("https://www.bilibili.com/video/BV1et411b73Z/",headers=headers) html=response.text print(html) soup = BeautifulSoup(html,"html.parser") all_titles=soup.findAll("span",attrs={"class":"part"}) for title in all_titles: print(title)
向大佬求助,小白一枚。能够爬到全部信息,但是提取不出来有用信息。
(ps,想要提取视频的全部目录)
有无大佬帮忙搂一眼。感谢❀❀❀