mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-28 06:17:46 +01:00
adding title parsing!
This commit is contained in:
parent
f8b083f64a
commit
2cd8830191
2 changed files with 6 additions and 2 deletions
|
@ -29,6 +29,8 @@ defmodule Philomena.Scrapers.Furaffinity do
|
|||
|> String.replace(~r/\n /, "\n")
|
||||
|> String.trim()
|
||||
|
||||
description = "##\s#{submission["title"]}\n#{description}"
|
||||
|
||||
%{
|
||||
source_url: url,
|
||||
author_name: submission["name"],
|
||||
|
|
|
@ -17,18 +17,20 @@ defmodule Philomena.Scrapers.Inkbunny do
|
|||
json = Jason.decode!(body)
|
||||
[submission] = json["submissions"]
|
||||
|
||||
description = "##\s#{submission["title"]}\n#{submission["description"]}"
|
||||
|
||||
images =
|
||||
for x <- submission["files"] do
|
||||
%{
|
||||
url: "#{x["file_url_full"]}",
|
||||
camo_url: Camo.Image.image_url(x["file_url_preview"])
|
||||
camo_url: Camo.Image.image_url(x["file_url_screen"])
|
||||
}
|
||||
end
|
||||
|
||||
%{
|
||||
source_url: url,
|
||||
author_name: submission["username"],
|
||||
description: submission["description"],
|
||||
description: description,
|
||||
images: images
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue