nokogiri: switch to the nokogumbo-based html5 parser.
https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md#1120--2021-08-02
This commit is contained in:
@@ -269,7 +269,7 @@ module Sources
|
||||
resp = http.cache(1.minute).get(page_url_from_image_url, follow: {max_hops: 1})
|
||||
|
||||
if resp.status.success?
|
||||
Nokogiri::HTML(resp.body.to_s)
|
||||
resp.parse
|
||||
# the work was deleted
|
||||
elsif resp.code == 404
|
||||
nil
|
||||
|
||||
@@ -183,7 +183,7 @@ module Sources::Strategies
|
||||
end
|
||||
|
||||
def inline_images
|
||||
html = Nokogiri::HTML.fragment(artist_commentary_desc)
|
||||
html = Nokogiri::HTML5.fragment(artist_commentary_desc)
|
||||
html.css("img").map { |node| node["src"] }
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user