mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-31 00:37:45 +02: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
|
conn
|
||||||
|
|
||||||
%{"scraper_cache" => url} when not is_nil(url) and url != "" ->
|
%{"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
|
headers = if String.contains?(url, "pximg.net") do
|
||||||
[{"Referer", "https://pixiv.net/"}]
|
[{"Referer", "https://pixiv.net/"}]
|
||||||
else
|
else
|
||||||
|
@ -23,9 +29,6 @@ defmodule PhilomenaWeb.ScraperPlug do
|
||||||
url
|
url
|
||||||
|> Philomena.Http.get(headers)
|
|> Philomena.Http.get(headers)
|
||||||
|> maybe_fixup_params(url, opts, conn)
|
|> maybe_fixup_params(url, opts, conn)
|
||||||
|
|
||||||
_ ->
|
|
||||||
conn
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue