summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/DepositfilesCom.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-08-06 17:49:11 +0200
committerGravatar Jeix <devnull@localhost> 2010-08-06 17:49:11 +0200
commitaa23a9ee2d169ff7a0b634d7dc0c6a9e2d7c348b (patch)
tree6ea6325528a0ca55c8143a398fedadc3346e6453 /module/plugins/hoster/DepositfilesCom.py
parentmerge (diff)
downloadpyload-aa23a9ee2d169ff7a0b634d7dc0c6a9e2d7c348b.tar.xz
megaupload, zippyshare and depositfiles free user working
Diffstat (limited to 'module/plugins/hoster/DepositfilesCom.py')
-rw-r--r--module/plugins/hoster/DepositfilesCom.py28
1 files changed, 23 insertions, 5 deletions
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index f4ccf45c8..45ba42544 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -14,12 +14,30 @@ class DepositfilesCom(Hoster):
__author_name__ = ("spoob")
__author_mail__ = ("spoob@pyload.org")
- def __init__(self, parent):
- Hoster.__init__(self, parent)
- self.parent = parent
- self.html = None
- self.multi_dl = False
+ def setup(self):
+ self.multiDL = False
+
+ def process(self, pyfile):
+ self.pyfile = pyfile
+ self.prepare()
+ pyfile.name = self.get_file_name()
+ self.download(self.get_file_url())
+ def prepare(self):
+ self.html = self.load(self.pyfile.url)
+ if re.search(r'File is checked, please try again in a minute.', self.html) != None:
+ self.log.info("DepositFiles.com: The file is being checked. Waiting 1 minute.")
+ self.setWait(61)
+ self.wait()
+
+ if re.search(r'Such file does not exist or it has been removed for infringement of copyrights', self.html) != None:
+ self.offline()
+
+ self.html = self.load(self.pyfile.url, post={"gateway_result":"1"})
+ wait_time = int(re.search(r'<span id="download_waiter_remain">(.*?)</span>', self.html).group(1))
+ self.setWait(wait_time)
+ self.log.debug("DepositFiles.com: Waiting %d seconds." % wait_time)
+
def get_file_url(self):
return urllib.unquote(re.search('<form action="(http://.+?\.depositfiles.com/.+?)" method="get"', self.html).group(1))