diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-16 00:46:26 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-16 00:46:26 +0200 |
commit | a1e78f33dc2b0b6777fdcbc415673f3965b25542 (patch) | |
tree | 4f2f0c9d7592482409740be8647f8f6849d30681 /module/plugins/crypter/MediafireComFolder.py | |
parent | [StealthTo] Mark dead (diff) | |
download | pyload-a1e78f33dc2b0b6777fdcbc415673f3965b25542.tar.xz |
Prefer self.urls and self.packages for adding links
Diffstat (limited to 'module/plugins/crypter/MediafireComFolder.py')
-rw-r--r-- | module/plugins/crypter/MediafireComFolder.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py index 728bd6bbb..5f1b9ad1b 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -22,8 +22,6 @@ class MediafireComFolder(Crypter): def decrypt(self, pyfile): - new_links = [] - url, result = checkHTMLHeader(pyfile.url) self.logDebug('Location (%d): %s' % (result, url)) @@ -33,7 +31,7 @@ class MediafireComFolder(Crypter): found = re.search(self.FILE_URL_PATTERN, html) if found: # file page - new_links.append("http://www.mediafire.com/file/%s" % found.group(1)) + self.urls.append("http://www.mediafire.com/file/%s" % found.group(1)) else: # folder page found = re.search(self.FOLDER_KEY_PATTERN, html) @@ -46,15 +44,13 @@ class MediafireComFolder(Crypter): #self.logInfo(json_resp) if json_resp['response']['result'] == "Success": for link in json_resp['response']['folder_info']['files']: - new_links.append("http://www.mediafire.com/file/%s" % link['quickkey']) + self.urls.append("http://www.mediafire.com/file/%s" % link['quickkey']) else: self.fail(json_resp['response']['message']) elif result == 1: self.offline() else: - new_links.append(url) + self.urls.append(url) - if new_links: - self.core.files.addLinks(new_links, pyfile.package().id) - else: + if not self.urls: self.fail('Could not extract any links') |