replace text.rextract() with rextr()

This commit is contained in:
Mike Fährmann
2025-05-23 18:28:58 +02:00
parent fe39b7d8c8
commit b81fc5c124
15 changed files with 23 additions and 25 deletions

View File

@@ -45,8 +45,7 @@ class SubscribestarExtractor(Extractor):
if "<html><body>" in content:
data["content"] = content = text.extr(
content, "<body>", "</body>")
data["title"] = text.unescape(
text.rextract(content, "<h1>", "</h1>")[0] or "")
data["title"] = text.unescape(text.rextr(content, "<h1>", "</h1>"))
yield Message.Directory, data
for num, item in enumerate(media, 1):