foundation.app: fix scraping of image urls.
Foundation changed their HTML page format and we can no longer scrape the image URL directly from the page. Instead we have to build it based on API data.
This commit is contained in:
@@ -96,7 +96,7 @@ module SourceTestHelper
|
||||
actual_values = actual_value.sort
|
||||
expected_value.sort.each_with_index { |each_value, index| assert_match(each_value, actual_values[index]) }
|
||||
else
|
||||
assert_equal(expected_value.sort, actual_value)
|
||||
assert_equal(expected_value.sort, actual_value.sort)
|
||||
end
|
||||
elsif expected_value.nil?
|
||||
assert_nil(actual_value)
|
||||
|
||||
@@ -23,6 +23,17 @@ module Sources
|
||||
)
|
||||
end
|
||||
|
||||
context "A foundation gif" do
|
||||
strategy_should_work(
|
||||
"https://foundation.app/@patch_oxxo/shine/1",
|
||||
artist_name: "patch_oxxo",
|
||||
profile_url: "https://foundation.app/@patch_oxxo",
|
||||
image_urls: ["https://f8n-ipfs-production.imgix.net/QmWQpt9opcue5F7Q2vTT5P5jPYo1xHhEs7RDxgXzWFHcfK/nft.gif"],
|
||||
download_size: 52_352_138,
|
||||
tags: %w[2d animation],
|
||||
)
|
||||
end
|
||||
|
||||
context "A foundation.app/@username/foo-bar-1234 URL" do
|
||||
strategy_should_work(
|
||||
"https://foundation.app/@asuka111art/dinner-with-cats-82426",
|
||||
|
||||
Reference in New Issue
Block a user