diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-02 00:32:30 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-02 00:32:30 +0100 |
commit | e51b2e4169736a727ab5c19224c7ad68b08113ed (patch) | |
tree | 01d0c61a968915afa51a8ee4078636e15f689c19 /module/plugins/hoster | |
parent | Merge pull request #1123 from zapp-brannigan/patch-1 (diff) | |
download | pyload-e51b2e4169736a727ab5c19224c7ad68b08113ed.tar.xz |
[XdadevelopersCom] Cleanup
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/XdadevelopersCom.py | 30 |
2 files changed, 20 insertions, 14 deletions
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 995b766b4..0022fc94f 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -37,8 +37,8 @@ class UploadedTo(SimpleHoster): for _i in xrange(5): html = getURL("http://uploaded.net/api/filemultiple", - get={"apikey": cls.API_KEY, 'id_0': re.match(cls.__pattern__, url).group('ID')}, - decode=True) + get={"apikey": cls.API_KEY, 'id_0': re.match(cls.__pattern__, url).group('ID')}, + decode=True) if html != "can't find request": api = html.split(",", 4) diff --git a/module/plugins/hoster/XdadevelopersCom.py b/module/plugins/hoster/XdadevelopersCom.py index 2ccff754f..9e3a47352 100644 --- a/module/plugins/hoster/XdadevelopersCom.py +++ b/module/plugins/hoster/XdadevelopersCom.py @@ -1,5 +1,7 @@ -# -*- coding: utf-8 -*- -# http://forum.xda-developers.com/devdb/project/dl/?id=10885 +# -*- coding: utf-8 -* +# +# Test links: +# http://forum.xda-developers.com/devdb/project/dl/?id=10885 import re @@ -9,26 +11,30 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class XdadevelopersCom(SimpleHoster): __name__ = "XdadevelopersCom" __type__ = "hoster" - __version__ = "0.01" + __version__ = "0.02" - __pattern__ = r'https?://(?:www\.)?forum.xda-developers.com/devdb/project/dl/\?id=\d+' + __pattern__ = r'https?://(?:www\.)?forum\.xda-developers\.com/devdb/project/dl/\?id=\d+' - __description__ = """forum.xdadevelopers.com hoster plugin (DevDB)""" + __description__ = """Xda-developers.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] - NAME_PATTERN = r'<label>Filename:</label>\n\t\t\t\t\t<div>\n\t\t\t\t\t(?P<N>.*?)\n\t\t\t\t\t</div>' - SIZE_PATTERN = r'<label>Size:</label>\n\t\t\t\t\t<div>\n\t\t\t\t\t(?P<S>[\d.]+)(?P<U>[kKmMgGbB]+)\n\t\t\t\t\t</div>\n' - + NAME_PATTERN = r'<label>Filename:</label>\s*<div>\s*(?P<N>.*?)\n' + SIZE_PATTERN = r'<label>Size:</label>\s*<div>\s*(?P<S>[\d.,]+)(?P<U>[\w^_]+)' OFFLINE_PATTERN = r'</i> Device Filter</h3>' def setup(self): - self.multiDL = True - self.chunkLimit = 1 + self.multiDL = True + self.resumeDownload = True + self.chunkLimit = 1 + + + def handleFree(self, pyfile): + self.download(pyfile.url, + get={'task': "get"}, + disposition=True) - def handleFree(self, pyfile): - self.download(pyfile.url+"&task=get",cookies=True,disposition=True) getInfo = create_getInfo(XdadevelopersCom) |