[erome] extract 'tags' metadata (#7076)

This commit is contained in:
Mike Fährmann
2025-02-28 10:11:15 +01:00
parent 1d3b9a9e40
commit 07a9dca459

View File

@@ -44,6 +44,8 @@ class EromeExtractor(Extractor):
pos = page.index('<div class="user-profile', pos)
user, pos = text.extract(
page, 'href="https://www.erome.com/', '"', pos)
tags, pos = text.extract(
page, '<p class="mt-10"', '</p>', pos)
urls = []
date = None
@@ -59,11 +61,13 @@ class EromeExtractor(Extractor):
date = text.parse_timestamp(ts)
data = {
"album_id" : album_id,
"title" : text.unescape(title),
"user" : text.unquote(user),
"count" : len(urls),
"date" : date,
"album_id": album_id,
"title" : text.unescape(title),
"user" : text.unquote(user),
"count" : len(urls),
"date" : date,
"tags" : [t.replace("+", " ")
for t in text.extract_iter(tags, "?q=", '"')],
"_http_headers": {"Referer": url},
}