mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-17 17:10:03 +01:00
Update civitai.ex
Clean empty lines
This commit is contained in:
parent
1a90f8cdc4
commit
66020ce8ac
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ defmodule PhilomenaProxy.Scrapers.Civitai do
|
||||||
{:ok, %{status: 200, body: body}} = PhilomenaProxy.Http.get(api_url)
|
{:ok, %{status: 200, body: body}} = PhilomenaProxy.Http.get(api_url)
|
||||||
|
|
||||||
json = Jason.decode!(body)
|
json = Jason.decode!(body)
|
||||||
|
|
||||||
case json["items"] do
|
case json["items"] do
|
||||||
[] ->
|
[] ->
|
||||||
%{
|
%{
|
||||||
|
@ -30,10 +30,10 @@ defmodule PhilomenaProxy.Scrapers.Civitai do
|
||||||
description: "",
|
description: "",
|
||||||
images: []
|
images: []
|
||||||
}
|
}
|
||||||
|
|
||||||
items ->
|
items ->
|
||||||
username = hd(items)["username"]
|
username = hd(items)["username"]
|
||||||
|
|
||||||
images =
|
images =
|
||||||
Enum.map(items, fn item ->
|
Enum.map(items, fn item ->
|
||||||
image_url = item["url"]
|
image_url = item["url"]
|
||||||
|
@ -42,7 +42,7 @@ defmodule PhilomenaProxy.Scrapers.Civitai do
|
||||||
camo_url: PhilomenaProxy.Camo.image_url(image_url)
|
camo_url: PhilomenaProxy.Camo.image_url(image_url)
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
%{
|
%{
|
||||||
source_url: url,
|
source_url: url,
|
||||||
author_name: username,
|
author_name: username,
|
||||||
|
|
Loading…
Add table
Reference in a new issue