-
-
Save parthibx24/8c57ebe9cfbdfebf1dfa09b070592dd9 to your computer and use it in GitHub Desktop.
Mediafire file downloader!
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
echo "Mediafire file downloader"; | |
FILE_ID=$1 | |
function download() { | |
GET_DLINK=`curl -s -L http://www.mediafire.com/file/$FILE_ID | grep -o '<div class="download_link".* id=.* name=.*>.*</div>' | hxselect a | awk '{gsub(/"/," ",$2); print $2}' | awk '{ print $2}'` | |
DLINK=$GET_DLINK | |
echo ""; | |
echo "Download Link (Direct): $DLINK" | |
echo ""; | |
wget $DLINK | |
} | |
[ ! -z "$1" ] && download || echo "usage: mfd file-id" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment