From d1ef3957b2d9406ddf6a1404bcdf3fbe57033a0f Mon Sep 17 00:00:00 2001 From: oscarz Date: Tue, 1 Jul 2025 10:52:06 +0800 Subject: [PATCH] modify scripts --- iafd/src/iafd_scraper.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/iafd/src/iafd_scraper.py b/iafd/src/iafd_scraper.py index 1ba861b..da4992e 100644 --- a/iafd/src/iafd_scraper.py +++ b/iafd/src/iafd_scraper.py @@ -479,11 +479,18 @@ def parse_page_movie(soup, href, title): performer["name"] = link.text.strip() performer["href"] = host_url + link["href"] - performer["tags"] = [ - tag.strip() for br in cast.find_all("br") - if (tag := br.next_sibling) and isinstance(tag, str) and tag.strip() - ] - + #performer["tags"] = [ + # tag.strip() for br in cast.find_all("br") + # if (tag := br.next_sibling) and isinstance(tag, str) and tag.strip() + #] + + tags = [] + for br in cast.find_all("br"): + tag = br.next_sibling + if isinstance(tag, str) and tag.strip(): + tags.append(tag.strip()) + performer["tags"] = tags + #performer["tags"] = [br.next_sibling.strip() for br in cast.find_all("br") if br.next_sibling and (br.next_sibling).strip()] performers.append(performer)