mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-28 06:17:46 +01:00
Adding tags to inkbunny
This commit is contained in:
parent
9af9334213
commit
b947079616
2 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,7 @@ defmodule Philomena.Scrapers.Inkbunny do
|
|||
|
||||
json = Jason.decode!(body)
|
||||
[submission] = json["submissions"]
|
||||
tags = submission["keywords"]["keyword_name"]
|
||||
|
||||
images = for x <- submission["files"] do
|
||||
%{
|
||||
|
@ -23,6 +24,7 @@ defmodule Philomena.Scrapers.Inkbunny do
|
|||
|
||||
%{
|
||||
source_url: url,
|
||||
tags: tags,
|
||||
author_name: submission["username"],
|
||||
description: submission["description"],
|
||||
images: images
|
||||
|
|
|
@ -315,7 +315,7 @@ defmodule PhilomenaWeb.ImageView do
|
|||
"pbs.twimg.com",
|
||||
"twimg.com"
|
||||
] ->
|
||||
"fab fa-twitter"
|
||||
"fa-brands fa-twitter"
|
||||
|
||||
u
|
||||
when u in [
|
||||
|
@ -450,6 +450,9 @@ defmodule PhilomenaWeb.ImageView do
|
|||
|
||||
u when u in ["etsy.com", "www.etsy.com"] ->
|
||||
"fab fa-etsy"
|
||||
|
||||
u when u in ["derpibooru.org", "derpicdn.net"] ->
|
||||
"fa-solid fa-horse-head"
|
||||
|
||||
link ->
|
||||
cond do
|
||||
|
|
Loading…
Add table
Reference in a new issue