diff options
Diffstat (limited to 'module/plugins/hoster')
| -rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 26 | 
1 files changed, 15 insertions, 11 deletions
| 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<ID>\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 | 
