diff options
author | 2015-06-05 14:17:43 +0200 | |
---|---|---|
committer | 2015-06-05 14:17:43 +0200 | |
commit | 43965c049b329220dec95cfc19feffc5053a7e2b (patch) | |
tree | b97248b9cbeb905312076d147d2e12179e3d8de6 /module/plugins/hoster/ShareonlineBiz.py | |
parent | Merge pull request #1 from pyload/stable (diff) | |
parent | [NitroflareCom] Account fixup (2) (diff) | |
download | pyload-43965c049b329220dec95cfc19feffc5053a7e2b.tar.xz |
Merge pull request #2 from pyload/stable
sync
Diffstat (limited to 'module/plugins/hoster/ShareonlineBiz.py')
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index a260f39f7..64a490993 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -6,14 +6,14 @@ import urllib import urlparse from module.network.RequestFactory import getURL -from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ShareonlineBiz(SimpleHoster): __name__ = "ShareonlineBiz" __type__ = "hoster" - __version__ = "0.50" + __version__ = "0.51" __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)] @@ -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 |