summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/WebshareCz.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/WebshareCz.py')
-rw-r--r--module/plugins/hoster/WebshareCz.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py
index a08341ff3..e3424fc21 100644
--- a/module/plugins/hoster/WebshareCz.py
+++ b/module/plugins/hoster/WebshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class WebshareCz(SimpleHoster):
__name__ = "WebshareCz"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__pattern__ = r'https?://(?:www\.)?webshare\.cz/(?:#/)?file/(?P<ID>\w+)'
@@ -40,12 +40,11 @@ class WebshareCz(SimpleHoster):
return info
- def handleFree(self):
- fid = re.match(self.__pattern__, self.pyfile.url).group('ID')
+ def handleFree(self, pyfile):
wst = self.account.infos['wst'] if self.account and 'wst' in self.account.infos else ""
api_data = getURL('https://webshare.cz/api/file_link/',
- post={'ident': fid, 'wst': wst},
+ post={'ident': self.info['pattern']['ID'], 'wst': wst},
decode=True)
self.logDebug("API data: " + api_data)
@@ -57,8 +56,8 @@ class WebshareCz(SimpleHoster):
self.link = m.group(1)
- def handlePremium(self):
- return self.handleFree()
+ def handlePremium(self, pyfile):
+ return self.handleFree(pyfile)
getInfo = create_getInfo(WebshareCz)