summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar zapp-brannigan <zapp-brannigan@users.noreply.github.com> 2015-02-01 10:37:35 +0100
committerGravatar zapp-brannigan <zapp-brannigan@users.noreply.github.com> 2015-02-01 10:37:35 +0100
commita60e583ea0fe136bc70e5558cb1cfc1a2c0ab6f5 (patch)
tree25115363b804ae1b176858a925b22c277c26cd94
parentMerge pull request #1121 from immenz/JustPremDev (diff)
downloadpyload-a60e583ea0fe136bc70e5558cb1cfc1a2c0ab6f5.tar.xz
[New Hoster] xdadevelopers.com
Just a small plugin to download stuff from XDA's DevDB
-rw-r--r--module/plugins/hoster/XdadevelopersCom.py37
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)