Skip to content

Instantly share code, notes, and snippets.

@hardiksondagar
Last active July 9, 2024 08:31
Show Gist options
  • Save hardiksondagar/c4f6064b3942eb8091a0d3595bf320fd to your computer and use it in GitHub Desktop.
Save hardiksondagar/c4f6064b3942eb8091a0d3595bf320fd to your computer and use it in GitHub Desktop.
Download TV shows and movies via shell script

Required

  • lynx

    sudo apt-get install lynx
    

Example

  1. Google the TV show or movie name with prefix Index of [TV SHOW NAME/MOVIE NAME]. For example for Better Call Saul search Index of Better Call Saul and copy the url which has all the video links.
  2. If video has multiple resolution, filter by string like 480 or 720.
  3. sh heisernberg.sh [URL] [FILTER]
#!/bin/bash
URL=$1
FILTER=$2
lynx -listonly -dump -nonumbers $URL | grep $FILTER > links.txt
while IFS= read -r link
do
echo "Downloading link $link"
wget -bqc "$(echo $link)"
done < 'links.txt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment