summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FilepupNet.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 22:08:34 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 22:08:34 +0200
commit55233a0e25d6034c9b80568fdda24041a00b2eb9 (patch)
tree57442f6001a8dd2ddbe2cae76b7aac0fe76a48df /module/plugins/hoster/FilepupNet.py
parent[MegasharesCom] Update patterns (diff)
downloadpyload-55233a0e25d6034c9b80568fdda24041a00b2eb9.tar.xz
New hoster plugin FilepupNet
Diffstat (limited to 'module/plugins/hoster/FilepupNet.py')
-rw-r--r--module/plugins/hoster/FilepupNet.py50
1 files changed, 50 insertions, 0 deletions
diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py
new file mode 100644
index 000000000..69065565f
--- /dev/null
+++ b/module/plugins/hoster/FilepupNet.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+#
+# Test links:
+# http://www.filepup.net/files/k5w4ZVoF1410184283.html
+# http://www.filepup.net/files/R4GBq9XH1410186553.html
+
+import re
+
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+
+class FilepupNet(SimpleHoster):
+ __name__ = "FilepupNet"
+ __type__ = "hoster"
+ __version__ = "0.01"
+
+ __pattern__ = r"http://(?:www\.)?filepup\.net/files/\w+"
+
+ __description__ = """Filepup.net hoster plugin"""
+ __author_name__ = ("zapp-brannigan", "Walter Purcaro")
+ __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com")
+
+
+ FILE_NAME_PATTERN = r'>(?P<N>.+?)</h1>'
+ FILE_SIZE_PATTERN = r'class="fa fa-archive"></i> \((?P<S>[\d.]+) (?P<U>\w+)'
+
+ OFFLINE_PATTERN = r'>This file has been deleted'
+
+ LINK_PATTERN = r'(http://www\.filepup\.net/get/.+?)\''
+
+
+ def setup(self):
+ self.multiDL = False
+ self.chunkLimit = 1
+
+
+ def handleFree(self):
+ m = re.search(self.LINK_PATTERN, self.html)
+ if m is None:
+ self.parseError("Download link not found")
+
+ dl_link = m.group(1)
+ self.download(dl_link, post={'task': "download"})
+
+ check = self.checkDownload({'html': re.compile("html")})
+ if check == "html":
+ self.parseError("Downloaded file is an html file")
+
+
+getInfo = create_getInfo(FilepupNet)