diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 17:40:27 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 17:40:27 +0200 |
commit | cdd7d2db6b372a38a6b4281f19881b95aa5b7a50 (patch) | |
tree | 9b9e29d2f85e99ef558f49d3c33ebad6ff69552c /module | |
parent | Changed XFileSharingPro and UpdateManager to internal plugins (diff) | |
parent | [Dev-Host] Improve patterns a bit (diff) | |
download | pyload-cdd7d2db6b372a38a6b4281f19881b95aa5b7a50.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
pyload/plugins/ocr/GigasizeCom.py
pyload/plugins/ocr/LinksaveIn.py
pyload/plugins/ocr/NetloadIn.py
pyload/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/crypter/DevhostStFolder.py | 29 | ||||
-rw-r--r-- | module/plugins/hoster/KingfilesNet.py | 22 |
2 files changed, 36 insertions, 15 deletions
diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py new file mode 100644 index 000000000..0d9c032cb --- /dev/null +++ b/module/plugins/crypter/DevhostStFolder.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://d-h.st/users/shine/?fld_id=37263#files + +import re + +from urlparse import urljoin + +from module.plugins.internal.SimpleCrypter import SimpleCrypter + + +class DevhostStFolder(SimpleCrypter): + __name__ = "DevhostStFolder" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?d-h\.st/users/\w+/\?fld_id=\d+' + + __description__ = """d-h.st decrypter plugin""" + __author_name_ = "zapp-brannigan" + __author_mail_ = "fuerst.reinje@web.de" + + + LINK_PATTERN = r';"><a href="/(\w+)' + + + def getLinks(self): + return [urljoin("http://d-h.st", link) for link in re.findall(self.LINK_PATTERN, self.html)] diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py index 4d87a5933..e8aefa53b 100644 --- a/module/plugins/hoster/KingfilesNet.py +++ b/module/plugins/hoster/KingfilesNet.py @@ -11,7 +11,7 @@ class KingfilesNet(SimpleHoster): __type__ = "hoster" __version__ = "0.01" - __pattern__ = r'http://(?:www\.)?kingfiles\.net/\w{12}' + __pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})' __description__ = """Kingfiles.net hoster plugin""" __author_name__ = ("zapp-brannigan", "Walter Purcaro") @@ -23,11 +23,9 @@ class KingfilesNet(SimpleHoster): OFFLINE_PATTERN = r'>(File Not Found</b><br><br>|File Not Found</h2>)' - FILE_ID_PATTERN = r'<input type=\"hidden\" name=\"id\" value=\"(.+)\">' RAND_ID_PATTERN = r'type=\"hidden\" name=\"rand\" value=\"(.+)\">' LINK_PATTERN = r'var download_url = \'(.+)\';' - SOLVEMEDIA_PATTERN = r'http://api\.solvemedia\.com/papi/challenge\.script\?k=(.+)\">' def setup(self): @@ -36,27 +34,21 @@ class KingfilesNet(SimpleHoster): def handleFree(self): - # Load main page and find file-id - a = self.load(self.pyfile.url, cookies=True, decode=True) - file_id = re.search(self.FILE_ID_PATTERN, a).group(1) - self.logDebug("file_id", file_id) - # Click the free user button post_data = {'op': "download1", 'usr_login': "", - 'id': file_id, + 'id': file_info['ID'], 'fname': self.pyfile.name, 'referer': "", 'method_free': "+"} b = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True) - # Do the captcha stuff - m = re.search(self.SOLVEMEDIA_PATTERN, b) - if m is None: - self.parseError("Captcha key not found") - solvemedia = SolveMedia(self) - captcha_key = m.group(1) + + captcha_key = solvemedia.detect_key() + if captcha_key is None: + self.parseError("SolveMedia key not found") + self.logDebug("captcha_key", captcha_key) captcha_challenge, captcha_response = solvemedia.challenge(captcha_key) |