diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 19:29:13 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 19:29:13 +0100 |
commit | d8cc7dac4e76f3ee10641b17f58994edb09c3695 (patch) | |
tree | 209afd8cb79919bab83babb1084d6555ab720453 /pyload/plugins/account/DevhostStFolder.py | |
parent | [RapiduNet] Improve account plugin (diff) | |
download | pyload-d8cc7dac4e76f3ee10641b17f58994edb09c3695.tar.xz |
Fix bad merge
Diffstat (limited to 'pyload/plugins/account/DevhostStFolder.py')
-rw-r--r-- | pyload/plugins/account/DevhostStFolder.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/pyload/plugins/account/DevhostStFolder.py b/pyload/plugins/account/DevhostStFolder.py deleted file mode 100644 index 942dc6b59..000000000 --- a/pyload/plugins/account/DevhostStFolder.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Test links: -# http://d-h.st/users/shine/?fld_id=37263#files - -import re - -from urlparse import urljoin - -from pyload.plugins.internal.SimpleCrypter import SimpleCrypter - - -class DevhostStFolder(SimpleCrypter): - __name = "DevhostStFolder" - __type = "crypter" - __version = "0.03" - - __pattern = r'http://(?:www\.)?d-h\.st/users/(?P<USER>\w+)(/\?fld_id=(?P<ID>\d+))?' - __config = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] - - __description = """d-h.st folder decrypter plugin""" - __license = "GPLv3" - __authors = [("zapp-brannigan", "fuerst.reinje@web.de"), - ("Walter Purcaro", "vuolter@gmail.com")] - - - LINK_PATTERN = r'(?:/> |;">)<a href="(.+?)"(?!>Back to \w+<)' - OFFLINE_PATTERN = r'"/cHP">test\.png<' - - - def getFileInfo(self): - if re.search(self.OFFLINE_PATTERN, self.html): - self.offline() - - try: - id = re.match(self.__pattern, self.pyfile.url).group('ID') - if id == "0": - raise - - p = r'href="(.+?)">Back to \w+<' - m = re.search(p, self.html) - html = self.load(urljoin("http://d-h.st", m.group(1)), - cookies=False) - - p = '\?fld_id=%s.*?">(.+?)<' % id - m = re.search(p, html) - name = folder = m.group(1) - - except Exception, e: - self.logDebug(e) - name = folder = re.match(self.__pattern, self.pyfile.url).group('USER') - - return {'name': name, 'folder': folder} - - - def getLinks(self): - return [urljoin("http://d-h.st", link) for link in re.findall(self.LINK_PATTERN, self.html)] |