#!/usr/bin/env python # -*- coding: UTF-8 -*- # # this script is for downloading files from rapidshare # Copyright (C) 2010 Jakub Jankiewicz (jcubic@onet.pl) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . from urllib2 import urlopen, Request from urllib import urlencode from sys import argv import os import re import time import base64 class DownloadLimitException(Exception): def __init__(self, *arg): Exception.__init__(self, *arg) def download(url): page = urlopen(url).read() action_url_regex = '