Adding tags to inkbunny

This commit is contained in:
Chaska 2024-04-29 01:01:52 -05:00
parent 9af9334213
commit b947079616
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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