modify scripts
This commit is contained in:
@ -165,7 +165,7 @@ def fetch_performers_detail():
|
||||
all_movies = []
|
||||
while next_url:
|
||||
logging.info(f"Fetching data for actor ({person}), url {next_url} ...")
|
||||
soup, status_code = scraper.fetch_page(next_url, partial(scraper.generic_validator, tag="div", identifier="movie-list h cols-4 vcols-5", attr_type="class"))
|
||||
soup, status_code = scraper.fetch_page(next_url, partial(scraper.generic_validator, tag="span", identifier="actor-section-name", attr_type="class"))
|
||||
if soup:
|
||||
data, next_url = scraper.parse_actor_detail(soup, next_url)
|
||||
if data:
|
||||
|
||||
@ -166,8 +166,11 @@ def parse_actor_detail(soup, href):
|
||||
|
||||
# 返回数据
|
||||
actor = {}
|
||||
|
||||
div_movies = soup.find("div", class_='movie-list h cols-4 vcols-5')
|
||||
|
||||
# 使用正则表达式查找 class 包含 'movie-list h cols-4' 的 div 元素
|
||||
div_movies = soup.find("div", class_=re.compile(r'movie-list h cols-'))
|
||||
#div_movies = soup.find("div", class_='movie-list h cols-4 vcols-5')
|
||||
#div_movies = soup.find("div", class_='movie-list h cols-4 vcols-8')
|
||||
if not div_movies:
|
||||
logging.warning(f"Warning: No movies div found ")
|
||||
return None, None
|
||||
|
||||
Reference in New Issue
Block a user