summaryrefslogtreecommitdiffstats
path: root/.scripts
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-08-10 11:42:55 -0400
committerGitHub <noreply@github.com>2018-08-10 11:42:55 -0400
commitd6b4fd8bbf667711d4f51b6589cf9eb2e0dd8724 (patch)
tree1a21b4073d883edd4625faa559258fdc229a30a6 /.scripts
parentccfe0f2018b240df79ce441885114e3f61b48950 (diff)
parentbcdd5eb4a2fdca223e247a612d6f5750da42b4aa (diff)
downloadeibhear-d6b4fd8bbf667711d4f51b6589cf9eb2e0dd8724.tar.gz
eibhear-d6b4fd8bbf667711d4f51b6589cf9eb2e0dd8724.tar.zst
eibhear-d6b4fd8bbf667711d4f51b6589cf9eb2e0dd8724.zip
Merge pull request #101 from The-King-of-Toasters/master
Change sci-hub command to use 1 perl-style grep
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/linkhandler2
1 files changed, 1 insertions, 1 deletions
diff --git a/.scripts/linkhandler b/.scripts/linkhandler
index 94fdd83..f540dc0 100755
--- a/.scripts/linkhandler
+++ b/.scripts/linkhandler
@@ -31,7 +31,7 @@ elif echo $wgetFiles | grep -w $ext > /dev/null; then
elif echo "$@" | grep "$vidsites">/dev/null; then
setsid nohup mpv -quiet "$1" > /dev/null & disown
elif echo "$@" | grep "$academic">/dev/null; then
- curl -sO $(curl -s "$scihub""$@" | grep location.href | grep -o http.*pdf) & disown
+ curl -sO "$(curl -s "$scihub$*" | grep -Po "(?<=location.href=').+.pdf")" & disown
else
setsid nohup $BROWSER "$1" 2>/dev/null & disown
fi