[bellazon] ignore links to other threads or posts (#8392)

This commit is contained in:
Mike Fährmann
2025-10-12 08:42:58 +02:00
parent f89f55b215
commit 41a0d785ca
2 changed files with 12 additions and 1 deletions

View File

@@ -52,7 +52,11 @@ class BellazonExtractor(Extractor):
url = text.unescape(url or url_img)
if url.startswith(native):
if "/uploads/emoticons/" in url or "/profile/" in url:
if (
"/uploads/emoticons/" in url or
"/profile/" in url or
"/topic/" in url
):
continue
data["num"] += 1
if not (alt := text.extr(info, ' alt="', '"')) or (

View File

@@ -214,6 +214,13 @@ __tests__ = (
),
},
{
"#url" : "https://www.bellazon.com/main/topic/70367-elyzaveta-kovalenko/page/7/#comment-5506079",
"#comment" : "links to other threads (#8392)",
"#class" : bellazon.BellazonPostExtractor,
"#count" : 0,
},
{
"#url" : "https://www.bellazon.com/main/topic/57872-millie-brady/",
"#class" : bellazon.BellazonThreadExtractor,