mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-04-01 17:25:27 +02: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)
|
json = Jason.decode!(body)
|
||||||
[submission] = json["submissions"]
|
[submission] = json["submissions"]
|
||||||
|
tags = submission["keywords"]["keyword_name"]
|
||||||
|
|
||||||
images = for x <- submission["files"] do
|
images = for x <- submission["files"] do
|
||||||
%{
|
%{
|
||||||
|
@ -23,6 +24,7 @@ defmodule Philomena.Scrapers.Inkbunny do
|
||||||
|
|
||||||
%{
|
%{
|
||||||
source_url: url,
|
source_url: url,
|
||||||
|
tags: tags,
|
||||||
author_name: submission["username"],
|
author_name: submission["username"],
|
||||||
description: submission["description"],
|
description: submission["description"],
|
||||||
images: images
|
images: images
|
||||||
|
|
|
@ -315,7 +315,7 @@ defmodule PhilomenaWeb.ImageView do
|
||||||
"pbs.twimg.com",
|
"pbs.twimg.com",
|
||||||
"twimg.com"
|
"twimg.com"
|
||||||
] ->
|
] ->
|
||||||
"fab fa-twitter"
|
"fa-brands fa-twitter"
|
||||||
|
|
||||||
u
|
u
|
||||||
when u in [
|
when u in [
|
||||||
|
@ -451,6 +451,9 @@ defmodule PhilomenaWeb.ImageView do
|
||||||
u when u in ["etsy.com", "www.etsy.com"] ->
|
u when u in ["etsy.com", "www.etsy.com"] ->
|
||||||
"fab fa-etsy"
|
"fab fa-etsy"
|
||||||
|
|
||||||
|
u when u in ["derpibooru.org", "derpicdn.net"] ->
|
||||||
|
"fa-solid fa-horse-head"
|
||||||
|
|
||||||
link ->
|
link ->
|
||||||
cond do
|
cond do
|
||||||
Enum.member?(site_domains, link) ->
|
Enum.member?(site_domains, link) ->
|
||||||
|
|
Loading…
Add table
Reference in a new issue