Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

rapidshare.com downloads using wget

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
beowu1f
n00b
n00b
Posts: 4
Joined: Tue Apr 19, 2005 4:30 am

rapidshare.com downloads using wget

  • Quote

Post by beowu1f » Sat Apr 21, 2007 9:25 pm

! To fellow gentoo'ers out there !

This topic is a follow on from

http://www.markontech.com/2006/12/22/do ... -and-bash/

that describes how to download links to files found on rapidshare.com

environment: 1) Sitting behind my Dell M70 at mercedes bodyshop manufacturing facility
in south africa, Ease London (New C-Class Merc) thinking about how i
can improve the cycle time on my KUKA robot cell (B-Pillar) 8O

time: 1) 2 hrs... ok so im no guru globber, at least it works :)

Requirements: 1) An all spectacular standard gentoo/linux system (also works
on CYGWIN or any other linux box)
2) latest version of wget (beowu1f system= GNU Wget 1.10.2 )
3) An active rapidshare.com account with username and password
4) Direct Downloads option set to ON in rapidshare.com options menu
5) A never ending curiosity of how things work!

Changes: 1) Support for getopts is included [getopt(1) is now
deprecated]
2) This script also works in CYGWIN since CYGWIN does
not include getopt(1) at all!
3) GNU Wget 1.10.2 has a new --no-check-certificate option
that must be passed in order to gain access to rapidshare.com
and download the premiumzone.cgi page
4) Have Fun!

The Code: origionally written by Mark Sullivan ( thank you Mark )

1) first (main) BASH script
BashGet.sh

#!/bin/bash
# File Name: BashGet.sh
# Author: Mark Sullivan
# Edited by beowu1f: 1) Support for getopts is included [getopt(1) is now
# deprecated]
# 2) This script also works in CYGWIN since CYGWIN does
# not include getopt(1) at all!
# 3) GNU Wget 1.10.2 has a new --no-check-certificate option
# that must be passed in order to gain access to rapidshare.com
# and download the premiumzone.cgi page
# 4) Have Fun!

while getopts u:p:l: choice
do
case "$choice" in
u) user="$OPTARG";;
p) pass="$OPTARG";;
l) url="$OPTARG";;
[?]) echo; echo "Usage: $0 -u <username> -p <password> -l <URL> --> terminating..."; \
echo >&2; exit 1;;
esac
done

UserData=$(echo "-u " $user "-p " $pass "-u " $url)

#colour definitions
RED='\e[1;31m';CYAN='\e[1;36m';NC='\e[0m';BL='\e[1;34m';GR='\e[0;32m';YEL='\e[1;33m';DG='\e[1;30m'

echo
echo -e ${RED}
echo "****************************************************************************" >&2

echo "***Remember to turn on 'Direct Downloads' in rapidshare.com online setup!***" >&2
echo -e "****************************************************************************" >&2
echo -e ${NC}
echo
echo "<>-- your user data entered --<>"
echo $UserData
echo

echo -e ${CYAN}real URL:${NC}$url
fileName=`basename $url`
echo -e ${CYAN}Filename:${NC}$fileName
cookie=cookie

## LOGIN and save cookie ##
wget --save-cookies=$cookie -q --post-data="login=$user&password=$pass" \
https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi --no-check-certificate

echo

rm premiumzone.cgi

echo -e "${CYAN}downloading: ${BL}$fileName${NC} ..."
wget --load-cookies=$cookie -q $url -O ./downloads/$fileName --no-check-certificate

if [ $? == 0 ]
then
echo -e ${DG} "downloading complete! ${BL} [${GR} OK ${BL}]" >&2
else
echo -e ${RED} "wget did not complete. downloading failed!" ${NC} >&2; exit 1
fi
##############################################################################

My main reason for implementing getopts was for CYGWIN support. where ever i travel
i need to connect to my winblows machine at home and download various items.


2) then create this second script...RapDownload.sh

#!/bin/bash
# File Name: RapDownload.sh
# Author: Mark Sullivan
# Edited by beowu1f
# NOTE: change <username> to your rapidshare.com username
# change <password> to your rapidshare.com password

for url in `cat $1`
do
./BashGet.sh -u <username> -p <password> -l $url
done
##############################################################################

3) Be sure to change your username & password as indicated in the above script

4) Now make sure both scripts are executable by issueing:

$ chmod +x BashGet.sh RapDownload.sh

5) Next place all the links your interested in downloading from rapidshare.com
into any text file. (eg. vim files)
Mine looks something like this:

http://rapidshare.com/files/26270733/It ... t.pdf.html

6) make sure you have a downloads directory inside the current directory your
newly created scripts are in. Issue the command


$ mkdir downloads

7) You're now ready to try out your script. Issue the script command

$ ./RapDownload.sh files

and away you go! pretty colours and all!

Hope this has helped you on your journey to downloading from rapidshare.com
Once again thanks goes to Mark for all your support and good globbing!

beowu1f
[/b][/post]
Top
fluxd
n00b
n00b
Posts: 1
Joined: Mon Oct 29, 2007 9:07 pm

  • Quote

Post by fluxd » Mon Oct 29, 2007 9:09 pm

Hi, Thankyou very much for this howto. Its working perfectly. Is it possible to show the speed it is downloading at also?
Top
klmann
n00b
n00b
Posts: 2
Joined: Mon Sep 06, 2004 2:01 pm

  • Quote

Post by klmann » Tue Nov 13, 2007 10:08 am

What about this one:

Code: Select all

$ wget --http-user "USERNAME" --http-passwd "PASSWORD" -i rapidshare_linklist.txt 
Top
mattlinuxguy
n00b
n00b
Posts: 6
Joined: Wed Feb 20, 2008 5:43 pm

  • Quote

Post by mattlinuxguy » Thu Feb 21, 2008 11:22 pm

awesome i will check back this post later. i always download rapidshare stuff. i want a nice simple gui for it and the ability to add downloads to the gueue from another comp on my network
Top
Post Reply

4 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic