mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Add SciHub link support
This commit is contained in:
parent
6c54ccf774
commit
cb1c74be06
@ -28,6 +28,9 @@ imgurClientId=""
|
|||||||
# Temp file directory
|
# Temp file directory
|
||||||
tmpDir="/tmp/linkhandler"
|
tmpDir="/tmp/linkhandler"
|
||||||
|
|
||||||
|
# SciHub domain
|
||||||
|
sciHub="http://sci-hub.tw"
|
||||||
|
|
||||||
|
|
||||||
## Handlers
|
## Handlers
|
||||||
# Images
|
# Images
|
||||||
@ -285,6 +288,12 @@ for arg; do
|
|||||||
printMessage "Link type: Gif"
|
printMessage "Link type: Gif"
|
||||||
gifQueue+=( "${arg%/DASHPlaylist.mpd}/DASHPlaylist.mpd" )
|
gifQueue+=( "${arg%/DASHPlaylist.mpd}/DASHPlaylist.mpd" )
|
||||||
|
|
||||||
|
# SciHub document
|
||||||
|
elif [[ $arg =~ springer\.com/.+ ]]; then
|
||||||
|
printMessage "Link type: Download"
|
||||||
|
curl -sO "$(curl -s "$sciHub/$arg" |
|
||||||
|
grep -Po "(?<=location.href=').+.pdf")" &disown
|
||||||
|
|
||||||
# Gif
|
# Gif
|
||||||
elif echo "$arg" | grep -q "$gifSites" ||
|
elif echo "$arg" | grep -q "$gifSites" ||
|
||||||
echo "$gifFiles" | grep -q "${ext%%\?*}"; then
|
echo "$gifFiles" | grep -q "${ext%%\?*}"; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user