Skip to content

Instantly share code, notes, and snippets.

@jbuchbinder
Last active September 23, 2015 04:01
Show Gist options
  • Save jbuchbinder/b8698b84ba4933131343 to your computer and use it in GitHub Desktop.
Save jbuchbinder/b8698b84ba4933131343 to your computer and use it in GitHub Desktop.
#!/bin/bash
for FC in $*; do
DLCODE=$( wget -O - -q "http://thevideo.me/cgi-bin/index_dl.cgi?op=get_vid_versions&file_code=$FC" | grep "Normal quality" | cut -d'"' -f6 )
LANDINGURL="http://thevideo.me/download/$( echo $DLCODE | cut -d\' -f2 )/$( echo $DLCODE | cut -d\' -f4 )/$( echo $DLCODE | cut -d\' -f6 )"
wget -O /dev/null -q "$LANDINGURL"
sleep 2
wget -c $( curl -s -X POST -d "op=download_orig&id=${FC}&hash=$( echo $DLCODE | cut -d\' -f6 )" "$LANDINGURL" | grep btn_download | cut -d'"' -f2 )
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment