[bellazon] ignore links to other threads or posts (#8392)
This commit is contained in:
@@ -52,7 +52,11 @@ class BellazonExtractor(Extractor):
|
|||||||
url = text.unescape(url or url_img)
|
url = text.unescape(url or url_img)
|
||||||
|
|
||||||
if url.startswith(native):
|
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
|
continue
|
||||||
data["num"] += 1
|
data["num"] += 1
|
||||||
if not (alt := text.extr(info, ' alt="', '"')) or (
|
if not (alt := text.extr(info, ' alt="', '"')) or (
|
||||||
|
|||||||
@@ -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/",
|
"#url" : "https://www.bellazon.com/main/topic/57872-millie-brady/",
|
||||||
"#class" : bellazon.BellazonThreadExtractor,
|
"#class" : bellazon.BellazonThreadExtractor,
|
||||||
|
|||||||
Reference in New Issue
Block a user