mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-28 06:17:46 +01:00
Revert "fixing scraper_plugin to work with Pixiv"
This reverts commit 0ff5df14f3
.
This commit is contained in:
parent
fc4529a3e0
commit
dfb5314d93
1 changed files with 6 additions and 3 deletions
|
@ -14,6 +14,12 @@ defmodule PhilomenaWeb.ScraperPlug do
|
|||
conn
|
||||
|
||||
%{"scraper_cache" => url} when not is_nil(url) and url != "" ->
|
||||
url
|
||||
|> Philomena.Http.get()
|
||||
|> maybe_fixup_params(url, opts, conn)
|
||||
|
||||
_ ->
|
||||
conn
|
||||
headers = if String.contains?(url, "pximg.net") do
|
||||
[{"Referer", "https://pixiv.net/"}]
|
||||
else
|
||||
|
@ -23,9 +29,6 @@ defmodule PhilomenaWeb.ScraperPlug do
|
|||
url
|
||||
|> Philomena.Http.get(headers)
|
||||
|> maybe_fixup_params(url, opts, conn)
|
||||
|
||||
_ ->
|
||||
conn
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue