summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/RapidshareCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/RapidshareCom.py')
-rw-r--r--module/plugins/hoster/RapidshareCom.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
index befbbb123..2dd36b84e 100644
--- a/module/plugins/hoster/RapidshareCom.py
+++ b/module/plugins/hoster/RapidshareCom.py
@@ -70,10 +70,12 @@ class RapidshareCom(Hoster):
self.chunkLimit = -1 if self.premium else 1
self.multiDL = self.resumeDownload = self.premium
+
def process(self, pyfile):
self.url = pyfile.url
self.prepare()
+
def prepare(self):
m = re.match(self.__pattern__, self.url)
@@ -106,6 +108,7 @@ class RapidshareCom(Hoster):
else:
self.fail("Unknown response code.")
+
def handleFree(self):
while self.no_download:
self.dl_dict = self.freeWait()
@@ -128,12 +131,14 @@ class RapidshareCom(Hoster):
self.offset += 5
self.handleFree()
+
def handlePremium(self):
info = self.account.getAccountInfo(self.user, True)
self.logDebug("%s: Use Premium Account" % self.__name__)
url = self.api_data['mirror']
self.download(url, get={"directstart": 1})
+
def download_api_data(self, force=False):
"""
http://images.rapidshare.com/apidoc.txt
@@ -168,6 +173,7 @@ class RapidshareCom(Hoster):
self.api_data['mirror'] = "http://rs%(serverid)s%(shorthost)s.rapidshare.com/files/%(fileid)s/%(filename)s" % self.api_data
+
def freeWait(self):
"""downloads html with the important information
"""
@@ -219,6 +225,7 @@ class RapidshareCom(Hoster):
return dl_dict
+
def get_file_name(self):
if self.api_data['filename']:
return self.api_data['filename']