diff options
Diffstat (limited to 'module/plugins/hoster/ShareonlineBiz.py')
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 33e37cbc7..64a490993 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -39,25 +39,24 @@ class ShareonlineBiz(SimpleHoster): def apiInfo(cls, url): info = super(ShareonlineBiz, cls).apiInfo(url) - if url: - field = getURL("http://api.share-online.biz/linkcheck.php", - get={'md5' : "1", - 'links': re.match(cls.__pattern__, url).group("ID")}, - decode=True).split(";") - - 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 - - except IndexError: - pass + field = getURL("http://api.share-online.biz/linkcheck.php", + get={'md5' : "1", + 'links': re.match(cls.__pattern__, url).group("ID")}, + decode=True).split(";") + + 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 + + except IndexError: + pass return info |