diff options
Diffstat (limited to 'pyload/plugins/crypter/XfilesharingProFolder.py')
-rw-r--r-- | pyload/plugins/crypter/XfilesharingProFolder.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pyload/plugins/crypter/XfilesharingProFolder.py b/pyload/plugins/crypter/XfilesharingProFolder.py new file mode 100644 index 000000000..90e3044a3 --- /dev/null +++ b/pyload/plugins/crypter/XfilesharingProFolder.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +from module.plugins.Crypter import Crypter, Package +import re + +class XfilesharingProFolder(Crypter): + __name__ = "XfilesharingProFolder" + __type__ = "crypter" + __pattern__ = r"http://(?:www\.)?((easybytez|turboupload|uploadville|file4safe|fileband|filebeep|grupload|247upload)\.com|(muchshare|annonhost).net|bzlink.us)/users/.*" + __version__ = "0.01" + __description__ = """Generic XfilesharingPro Folder Plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + LINK_PATTERN = r'<div class="link"><a href="([^"]+)" target="_blank">[^<]*</a></div>' + SUBFOLDER_PATTERN = r'<TD width="1%"><img src="[^"]*/images/folder2.gif"></TD><TD><a href="([^"]+)"><b>(?!\. \.<)([^<]+)</b></a></TD>' + + def decryptURL(self, url): + return self.decryptFile(self.load(url, decode = True)) + + def decryptFile(self, html): + new_links = [] + + new_links.extend(re.findall(self.LINK_PATTERN, html)) + + subfolders = re.findall(self.SUBFOLDER_PATTERN, html) + #self.logDebug(subfolders) + for (url, name) in subfolders: + if self.package: name = "%s/%s" % (self.package.name, name) + new_links.append(Package(name, [url])) + + if not new_links: self.fail('Could not extract any links') + + return new_links
\ No newline at end of file |