Update inkbunny.ex

This commit is contained in:
Chaska 2024-04-20 20:59:10 -05:00 committed by GitHub
parent dc818b0f93
commit 73a83832ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,9 +12,11 @@ defmodule Philomena.Scrapers.Inkbunny do
{:ok, %Tesla.Env{status: 200, body: body}} = Philomena.Http.get(api_url)
json = Jason.decode!(body)
submission = json["submissions"]
images = submission["files"]["file_url_full"]
[submission] = json["submissions"]
images = for x <- submission["files"] do
x["file_url_full"]
end
%{
source_url: submission["url"],