Skip to content

Instantly share code, notes, and snippets.

@parthibx24
Last active July 14, 2023 18:17
Show Gist options
  • Save parthibx24/8c57ebe9cfbdfebf1dfa09b070592dd9 to your computer and use it in GitHub Desktop.
Save parthibx24/8c57ebe9cfbdfebf1dfa09b070592dd9 to your computer and use it in GitHub Desktop.
Mediafire file downloader!
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