Last active
January 14, 2018 10:18
-
-
Save assafmo/ecaba43fdaee552d9c598f05dca028a9 to your computer and use it in GitHub Desktop.
Download and unzip subtitles from wizdom.xyz (also script to get imdb_id from show/movie name)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
name="$1" | |
curl -s --compressed "https://duckduckgo.com/?q=%5Cimdb $name" | grep -oP 'tt[0-9]+' | head -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
imdb_id="$1" | |
search_regex="$2" | |
curl --compressed -s "http://json.wizdom.xyz/$imdb_id.json" | \ | |
jq . | \ | |
grep -Ei -B 1 "$search_regex" | \ | |
awk -F '"' '/"id"/{print $4}' | \ | |
parallel 'curl --compressed -s "http://zip.wizdom.xyz/{}.zip" > {}.zip; unzip -o {}.zip; rm -f {}.zip' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/assafmo/imdb.sh
https://github.com/assafmo/wizdom.sh