newgrounds: exclude links to other works in commentary.

Sometimes when a Newgrounds post is part of a set, there is a list of
links to other posts in the set in the artist's commentary. Exclude
these links because they're not really part of the commentary.

Example: https://www.newgrounds.com/art/view/boxofwant/annie-hughes-1 (NSFW)
This commit is contained in:
evazion
2022-04-02 23:06:20 -05:00
parent 6ad7df0ded
commit ca8083465b
2 changed files with 18 additions and 2 deletions

View File

@@ -68,11 +68,12 @@ module Source
end
def artist_commentary_desc
page&.css("#author_comments")&.to_html
return "" if page.nil?
page.dup.css("#author_comments").tap { _1.css("ul.itemlist").remove }.to_html
end
def dtext_artist_commentary_desc
DText.from_html(artist_commentary_desc)
DText.from_html(artist_commentary_desc).strip
end
def user_name