diff options
author | mkaay <mkaay@mkaay.de> | 2009-11-10 22:26:08 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-11-10 22:26:08 +0100 |
commit | 80e35e5a93845286e04baf56200955576fc2813c (patch) | |
tree | e461525c1b479108e74a838bf9f8218c7271e51f /module/plugins/RapidshareCom.py | |
parent | removed debug stuff from hotfile plugin (diff) | |
download | pyload-80e35e5a93845286e04baf56200955576fc2813c.tar.xz |
netload checksum check
Diffstat (limited to 'module/plugins/RapidshareCom.py')
-rw-r--r-- | module/plugins/RapidshareCom.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/module/plugins/RapidshareCom.py b/module/plugins/RapidshareCom.py index 67db37245..7eeddf007 100644 --- a/module/plugins/RapidshareCom.py +++ b/module/plugins/RapidshareCom.py @@ -14,7 +14,7 @@ class RapidshareCom(Plugin): props = {} props['name'] = "RapidshareCom" props['type'] = "hoster" - props['pattern'] = r"http://(?:www.)?(rs\d*.)?rapidshare.com/files/" + props['pattern'] = r"http://(?:www\.)?(?:rs\d*\.)?rapidshare.com/files/(\d*?)/(.*)" props['version'] = "0.5" props['description'] = """Rapidshare.com Download Plugin""" props['author_name'] = ("spoob", "RaNaN", "mkaay") @@ -25,8 +25,6 @@ class RapidshareCom(Plugin): self.html_old = None #time() where loaded the HTML self.time_plus_wait = None #time() + wait in seconds self.want_reconnect = False - - self.urlRegex = re.compile(r'http://[\w\.]*?rapidshare\.com/files/([\d]{3,9})/?(.+)') # regex from jdownloader self.read_config() if self.config['premium']: @@ -83,10 +81,10 @@ class RapidshareCom(Plugin): url = self.parent.url api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" api_param = {"sub": "checkfiles_v1", "files": "", "filenames": "", "incmd5": "1"} - m = self.urlRegex.search(url) + m = re.compile(self.props['pattern']).search(url) if m: - api_param["files"] = m.group(1) - api_param["filenames"] = m.group(2) + api_param["files"] = m.group(3) + api_param["filenames"] = m.group(4) src = self.req.load(api_url_base, cookies=False, get=api_param) if not src.find("ERROR"): return |