diff options
-rw-r--r-- | module/plugins/hoster/XdadevelopersCom.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/module/plugins/hoster/XdadevelopersCom.py b/module/plugins/hoster/XdadevelopersCom.py new file mode 100644 index 000000000..a9ea64d6f --- /dev/null +++ b/module/plugins/hoster/XdadevelopersCom.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# http://forum.xda-developers.com/devdb/project/dl/?id=10885 + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class XdadevelopersCom(SimpleHoster): + __name__ = "XdadevelopersCom" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?forum.xda-developers.com/devdb/project/dl/\?id=\d+' + + __description__ = """forum.xdadevelopers.com hoster plugin (DevDB)""" + __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' + + OFFLINE_PATTERN = r'</i> Device Filter</h3>' + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + def handleFree(self, pyfile): + self.header = self.load(pyfile.url+"&task=get",cookies=True,just_header=True) + self.header = self.load(self.header["location"],cookies=True,just_header=True) + self.logDebug("Download-URL: %s" %self.header["location"]) + self.download(self.header["location"],cookies=True) + +getInfo = create_getInfo(XdadevelopersCom) |