[newgrounds] strip incomplete HTML tag from '_comment' (#2328)

This commit is contained in:
Mike Fährmann
2022-02-23 21:42:28 +01:00
parent 00fbc942e5
commit d71c173150

View File

@@ -120,9 +120,10 @@ class NewgroundsExtractor(Extractor):
extr = text.extract_from(page)
data = extract_data(extr, post_url)
data["_comment"] = extr('id="author_comments"', '</div>')
data["_comment"] = extr(
'id="author_comments"', '</div>').partition(">")[2]
data["comment"] = text.unescape(text.remove_html(
data["_comment"].partition(">")[2], "", ""))
data["_comment"], "", ""))
data["favorites"] = text.parse_int(extr(
'id="faves_load">', '<').replace(",", ""))
data["score"] = text.parse_float(extr('id="score_number">', '<'))