[newgrounds] provide 'comment_html' metadata (#7038)

This commit is contained in:
Mike Fährmann
2025-02-22 10:05:39 +01:00
parent 196aa263c2
commit 57937c3b68

View File

@@ -190,8 +190,8 @@ class NewgroundsExtractor(Extractor):
extr = text.extract_from(page)
data = extract_data(extr, post_url)
data["_comment"] = extr(
'id="author_comments"', '</div>').partition(">")[2]
data["comment_html"] = data["_comment"] = extr(
'id="author_comments"', '</div>').partition(">")[2].strip()
data["comment"] = text.unescape(text.remove_html(
data["_comment"]
.replace("<p><br></p>", "\n\n").replace("<br>", "\n"), "", ""))