Skip to content

Commit

Permalink
[newgrounds] strip incomplete HTML tag from '_comment' (#2328)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Feb 23, 2022
1 parent 00fbc94 commit d71c173
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gallery_dl/extractor/newgrounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ def extract_post(self, post_url):
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">', '<'))
Expand Down

0 comments on commit d71c173

Please sign in to comment.