mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-28 06:17:46 +01:00
Update baraag.ex
This commit is contained in:
parent
cc944f795b
commit
3bdc9e04ac
1 changed files with 6 additions and 9 deletions
|
@ -13,19 +13,16 @@ defmodule Philomena.Scrapers.Baraag do
|
|||
|
||||
toot = Jason.decode!(body)
|
||||
|
||||
images =
|
||||
Enum.map(toot["media_attachments"], fn p ->
|
||||
%{
|
||||
url: ["url"],
|
||||
camo_url: Camo.Image.image_url(p["preview_url"])
|
||||
}
|
||||
end)
|
||||
|
||||
%{
|
||||
source_url: toot["url"],
|
||||
author_name: toot["account"]["username"],
|
||||
description: toot["content"],
|
||||
images: images
|
||||
images: [
|
||||
%{
|
||||
url: "#{toot["media_attachments"]["url"]}",
|
||||
camo_url: Camo.Image.image_url(toot["media_attachments"]["preview_url"])
|
||||
}
|
||||
]
|
||||
}
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue