Skip to content

Instantly share code, notes, and snippets.

@mahdyar
Last active July 17, 2022 16:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahdyar/d6a1a8bda6074427e93f218712addc1f to your computer and use it in GitHub Desktop.
Save mahdyar/d6a1a8bda6074427e93f218712addc1f to your computer and use it in GitHub Desktop.
wir(){
NAME=$(sed 's/ /_/g' <<< "$@")
INITIAL=$(echo $NAME | head -c 1)
IMDB_ID=$(curl -ks "https://v2.sg.media-imdb.com/suggestion/$INITIAL/$NAME.json" | jq -r '.d[0].id')
LINK="https://wir31.site/${IMDB_ID}/"
curl -ks "$LINK" | lynx -dump -nonumbers -listonly -stdin | grep -e '.mkv' -e '.mp4' | grep 'http://'
}
@mahdyar
Copy link
Author

mahdyar commented Sep 2, 2021

WIR Downloader

Requirements

You should have jq, lynx and curl installed.
On macOS:

brew install jq lynx curl

Usage

Add this function to your ~/.bashrc, ~/.zshrc, etc.

Preview

Screen Recording 2021-09-03 at 1 00 08 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment