summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/CloudzillaTo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 21:59:10 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 21:59:10 +0100
commit8e7d14bae4d3c836f029a1235eb227380acc3f75 (patch)
treeebd0679642cccb994e70a89a106b394189cb28bc /module/plugins/hoster/CloudzillaTo.py
parentMerge branch 'stable' into 0.4.10 (diff)
downloadpyload-8e7d14bae4d3c836f029a1235eb227380acc3f75.tar.xz
Fix plugins to work on 0.4.10
Diffstat (limited to 'module/plugins/hoster/CloudzillaTo.py')
-rw-r--r--module/plugins/hoster/CloudzillaTo.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py
deleted file mode 100644
index ee966c280..000000000
--- a/module/plugins/hoster/CloudzillaTo.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-
-
-class CloudzillaTo(SimpleHoster):
- __name__ = "CloudzillaTo"
- __type__ = "hoster"
- __version__ = "0.06"
-
- __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)'
-
- __description__ = """Cloudzilla.to hoster plugin"""
- __license__ = "GPLv3"
- __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
-
-
- INFO_PATTERN = r'title="(?P<N>.+?)">\1</span> <span class="size">\((?P<S>[\d.]+) (?P<U>[\w^_]+)'
- OFFLINE_PATTERN = r'>File not found...<'
-
- PASSWORD_PATTERN = r'<div id="pwd_protected">'
-
-
- def checkErrors(self):
- m = re.search(self.PASSWORD_PATTERN, self.html)
- if m:
- self.html = self.load(self.pyfile.url, get={'key': self.getPassword()})
-
- if re.search(self.PASSWORD_PATTERN, self.html):
- self.retry(reason="Wrong password")
-
-
- def handleFree(self, pyfile):
- self.html = self.load("http://www.cloudzilla.to/generateticket/",
- post={'file_id': self.info['pattern']['ID'], 'key': self.getPassword()})
-
- ticket = dict(re.findall(r'<(.+?)>([^<>]+?)</', self.html))
-
- self.logDebug(ticket)
-
- if 'error' in ticket:
- if "File is password protected" in ticket['error']:
- self.retry(reason="Wrong password")
- else:
- self.fail(ticket['error'])
-
- if 'wait' in ticket:
- self.wait(ticket['wait'], int(ticket['wait']) > 5)
-
- self.link = "http://%(server)s/download/%(file_id)s/%(ticket_id)s" % {'server' : ticket['server'],
- 'file_id' : self.info['pattern']['ID'],
- 'ticket_id': ticket['ticket_id']}
-
-
- def handlePremium(self, pyfile):
- return self.handleFree(pyfile)
-
-
-getInfo = create_getInfo(CloudzillaTo)