diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 19:14:29 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 19:14:29 +0200 |
commit | 9d9618ab35071f36840fe51e63fe2f887131dc5a (patch) | |
tree | 47028e89e5a7a2ede5e1d0eddfa7930ba367baf6 /module/plugins/hoster/WebshareCz.py | |
parent | [SimpleCrypter] Don't use self.link(s) (diff) | |
download | pyload-9d9618ab35071f36840fe51e63fe2f887131dc5a.tar.xz |
Update hosters
Diffstat (limited to 'module/plugins/hoster/WebshareCz.py')
-rw-r--r-- | module/plugins/hoster/WebshareCz.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py index eb91974d7..84b487304 100644 --- a/module/plugins/hoster/WebshareCz.py +++ b/module/plugins/hoster/WebshareCz.py @@ -24,19 +24,17 @@ class WebshareCz(SimpleHoster): @classmethod def api_info(cls, url): - info = super(WebshareCz, cls).api_info(url) + info = {} + api = get_url("https://webshare.cz/api/file_info/", + post={'ident': re.match(cls.__pattern__, url).group('ID'), + 'wst' : ""}) - info['pattern'] = re.match(cls.__pattern__, url).groupdict() - - api_data = get_url("https://webshare.cz/api/file_info/", - post={'ident': info['pattern']['ID'], 'wst': ""}) - - if not re.search(r'<status>OK', api_data): + if not re.search(r'<status>OK', api): info['status'] = 1 else: info['status'] = 2 - info['name'] = re.search(r'<name>(.+?)<', api_data).group(1) - info['size'] = re.search(r'<size>(.+?)<', api_data).group(1) + info['name'] = re.search(r'<name>(.+?)<', api).group(1) + info['size'] = re.search(r'<size>(.+?)<', api).group(1) return info |