diff options
Diffstat (limited to 'module/plugins/hoster/FreeWayMe.py')
-rw-r--r-- | module/plugins/hoster/FreeWayMe.py | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py index 1cca24c3b..ed7c4bf7f 100644 --- a/module/plugins/hoster/FreeWayMe.py +++ b/module/plugins/hoster/FreeWayMe.py @@ -6,10 +6,12 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class FreeWayMe(MultiHoster): __name__ = "FreeWayMe" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.19" + __status__ = "testing" - __pattern__ = r'https://(?:www\.)?free-way\.me/.+' - __config__ = [("use_premium", "bool", "Use premium account if available", True)] + __pattern__ = r'https?://(?:www\.)?free-way\.(bz|me)/.+' + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("revertfailed", "bool", "Revert to standard download if fails", True)] __description__ = """FreeWayMe multi-hoster plugin""" __license__ = "GPLv3" @@ -17,36 +19,36 @@ class FreeWayMe(MultiHoster): def setup(self): - self.resumeDownload = False + self.resume_download = False self.multiDL = self.premium - self.chunkLimit = 1 + self.chunk_limit = 1 - def handlePremium(self, pyfile): - user, data = self.account.selectAccount() + def handle_premium(self, pyfile): + user, data = self.account.select() for _i in xrange(5): - # try it five times - header = self.load("https://www.free-way.me/load.php", + #: Try it five times + header = self.load("http://www.free-way.bz/load.php", #@TODO: Revert to `https` in 0.4.10 get={'multiget': 7, 'url' : pyfile.url, 'user' : user, - 'pw' : self.account.getAccountData(user)['password'], + 'pw' : self.account.get_info(self.user)['login']['password'], 'json' : ""}, just_header=True) if 'location' in header: headers = self.load(header['location'], just_header=True) if headers['code'] == 500: - # error on 2nd stage - self.logError(_("Error [stage2]")) + #: Error on 2nd stage + self.log_error(_("Error [stage2]")) else: - # seems to work.. + #: Seems to work.. self.download(header['location']) break else: - # error page first stage - self.logError(_("Error [stage1]")) + #: Error page first stage + self.log_error(_("Error [stage1]")) #@TODO: handle errors |