我试图用美丽的汤从rottentomatoes.com刮电影报价。页面源是有趣的,因为报价直接由跨度类“bold quote_actor”继续,但报价本身处于没有类的跨度中,例如, (https://www.rottentomatoes.com/m/happy_gilmore/quotes/): screenshot of web source 我想用美丽的汤的find_all来捕获所有的报价,没
我想学习使用python的数据刮擦,并已使用Requests和BeautifulSoup4库。它适用于普通的html网站。但是当我试图从延迟数据加载的网站中获取一些数据时,我发现我得到了一个空值。一个例子是 from bs4 import BeautifulSoup
from operator import itemgetter
from selenium import webdriver
我正在使用beautifulsoup来追加数组“get_link”中的所有链接。 get_link = []
for a in soup.find_all('a', href=True):
if a.get_text(strip=True):
get_link .append(a['href'])
输出get_link的: ['index.html?country=2',