summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2014-05-19 12:53:01 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2014-05-19 12:53:01 +0200
commit72a6a91533daa3a99d48c404a9c87b1b41679647 (patch)
treec2373649601bc56854bdee62f14527328d4f1db2 /module
parent[MovReel] Account plugin (diff)
downloadpyload-72a6a91533daa3a99d48c404a9c87b1b41679647.tar.xz
[DDLStorage] Improved getInfo
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/DdlstorageCom.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/hoster/DdlstorageCom.py b/module/plugins/hoster/DdlstorageCom.py
index a2c642574..eed53b1e1 100644
--- a/module/plugins/hoster/DdlstorageCom.py
+++ b/module/plugins/hoster/DdlstorageCom.py
@@ -18,14 +18,17 @@ def getInfo(urls):
ids[m.group('ID')] = url
for chunk in chunks(ids.keys(), 5):
- api = getURL('http://www.ddlstorage.com/cgi-bin/api_req.cgi',
- post={'req_type': 'file_info_free',
- 'client_id': 53472,
- 'file_code': ','.join(chunk),
- 'sign': md5('file_info_free%d%s%s' % (53472, ','.join(chunk),
- '25JcpU2dPOKg8E2OEoRqMSRu068r0Cv3')).hexdigest()})
- api = api.replace('<pre>', '').replace('</pre>', '')
- api = json_loads(api)
+ for _ in xrange(5):
+ api = getURL('http://www.ddlstorage.com/cgi-bin/api_req.cgi',
+ post={'req_type': 'file_info_free',
+ 'client_id': 53472,
+ 'file_code': ','.join(chunk),
+ 'sign': md5('file_info_free%d%s%s' % (53472, ','.join(chunk),
+ '25JcpU2dPOKg8E2OEoRqMSRu068r0Cv3')).hexdigest()})
+ api = api.replace('<pre>', '').replace('</pre>', '')
+ api = json_loads(api)
+ if 'error' not in api:
+ break
result = list()
for el in api:
@@ -40,7 +43,7 @@ class DdlstorageCom(XFileSharingPro):
__name__ = "DdlstorageCom"
__type__ = "hoster"
__pattern__ = r'http://(?:www\.)?ddlstorage.com/(?P<ID>\w{12})'
- __version__ = "1.00"
+ __version__ = "1.01"
__description__ = """DDLStorage.com hoster plugin"""
__author_name__ = ("zoidberg", "stickell")
__author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")