From 339b2e07d78b15ca014ee12f1501cdb235d9b064 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 18 May 2015 11:50:43 +0200 Subject: [SimpleHoster] Fix create_getInfo --- module/plugins/hoster/ShareonlineBiz.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/ShareonlineBiz.py') diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 505222fce..9d0cb631b 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -36,15 +36,13 @@ class ShareonlineBiz(SimpleHoster): @classmethod - def getInfo(cls, url="", html=""): - info = {'name': urlparse.urlparse(urllib.unquote(url)).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 3 if url else 1, 'url': url} + def apiInfo(cls, url): + info = super(ShareonlineBiz, cls).apiInfo(url) if url: - info['pattern'] = re.match(cls.__pattern__, url).groupdict() - field = getURL("http://api.share-online.biz/linkcheck.php", get={'md5': "1"}, - post={'links': info['pattern']['ID']}, + post={'links': re.match(cls.__pattern__, url).group("ID")}, decode=True).split(";") if field[1] == "OK": -- cgit v1.2.3