Automatic download from MegaUpload
Publié le 05 janvier 2011 par Ubugnu
This script allows you to:
- Store MegaUpload links in a file .list
- Run the script on a shell
- Stop and resume downloads at any time
- Add links to the files even when working
Create a file .list (hidden) in the downloads folder
ubugnu@ubugnu-laptop:~$ cd Downloads/
ubugnu@ubugnu-laptop:~$ touch .list
than create the script file
ubugnu@ubugnu-laptop:~$ sudo nano /usr/bin/mega
and put
#!/bin/bash
list=`cat .list
for l in $list
do
echo "downloading $l..."
wget -c `wget -qO- $l | grep -P "id=\"downloadlink\"" | grep -oP "(((http)\://){1}\S+)" | grep "megaupload.com\/files" | tr -d "\""`
echo "$l downloaded"
sed -i '1 d' .list
done;
make it executable
ubugnu@ubugnu-laptop:~$ sudo chmod +x /usr/bin/mega
To begin downloads, populate the .list file with MegaUpload links (line by line) than enter to the download folder and run the script
ubugnu@ubugnu-laptop:~$ cd Downloads/
ubugnu@ubugnu-laptop:~$ mega