From 3d1067556e9c2ca99e8479e36699af6436b3f6e3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 24 May 2015 04:57:11 +0200 Subject: [ShareonlineBiz] Fix https://github.com/pyload/pyload/issues/1424 --- module/plugins/hoster/ShareonlineBiz.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/ShareonlineBiz.py') diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 9d0cb631b..a260f39f7 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ShareonlineBiz(SimpleHoster): __name__ = "ShareonlineBiz" __type__ = "hoster" - __version__ = "0.49" + __version__ = "0.50" __pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -41,19 +41,23 @@ class ShareonlineBiz(SimpleHoster): if url: field = getURL("http://api.share-online.biz/linkcheck.php", - get={'md5': "1"}, - post={'links': re.match(cls.__pattern__, url).group("ID")}, + get={'md5' : "1", + 'links': re.match(cls.__pattern__, url).group("ID")}, decode=True).split(";") - if field[1] == "OK": - info['fileid'] = field[0] - info['status'] = 2 - info['name'] = field[2] - info['size'] = field[3] #: in bytes - info['md5'] = field[4].strip().lower().replace("\n\n", "") #: md5 + try: + if field[1] == "OK": + info['fileid'] = field[0] + info['status'] = 2 + info['name'] = field[2] + info['size'] = field[3] #: in bytes + info['md5'] = field[4].strip().lower().replace("\n\n", "") #: md5 - elif field[1] in ("DELETED", "NOT FOUND"): - info['status'] = 1 + elif field[1] in ("DELETED", "NOT FOUND"): + info['status'] = 1 + + except IndexError: + pass return info -- cgit v1.2.3