diff options
Diffstat (limited to 'plugin.video.wakanim/resources/lib')
-rw-r--r-- | plugin.video.wakanim/resources/lib/login.py | 4 | ||||
-rw-r--r-- | plugin.video.wakanim/resources/lib/netapi.py | 6 | ||||
-rw-r--r-- | plugin.video.wakanim/resources/lib/view.py | 7 | ||||
-rw-r--r-- | plugin.video.wakanim/resources/lib/wakanim.py | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/plugin.video.wakanim/resources/lib/login.py b/plugin.video.wakanim/resources/lib/login.py index 4d92a54..2ead064 100644 --- a/plugin.video.wakanim/resources/lib/login.py +++ b/plugin.video.wakanim/resources/lib/login.py @@ -51,7 +51,7 @@ def login(username, password, args): response = urllib2.urlopen("https://www.wakanim.tv/" + args._country + "/v2/catalogue") html = response.read() - if ("Meine Benachrichtigungen verwalten" in html) or ("Gérer mes notifications" in html) or ("Manage my notifications" in html): + if ("Meine Benachrichtigungen verwalten" in html) or ("Gérer mes notifications" in html) or ("Manage my notifications" in html) or ("Настройки уведомлений" in html): # session is valid return True @@ -70,7 +70,7 @@ def login(username, password, args): # check for login string html = response.read() - if ("Meine Benachrichtigungen verwalten" in html) or ("Gérer mes notifications" in html) or ("Manage my notifications" in html): + if ("Meine Benachrichtigungen verwalten" in html) or ("Gérer mes notifications" in html) or ("Manage my notifications" in html) or ("Настройки уведомлений" in html): # save session to disk cj.save(cookiepath, ignore_discard=True) return True diff --git a/plugin.video.wakanim/resources/lib/netapi.py b/plugin.video.wakanim/resources/lib/netapi.py index 1fd5e6f..e169796 100644 --- a/plugin.video.wakanim/resources/lib/netapi.py +++ b/plugin.video.wakanim/resources/lib/netapi.py @@ -246,7 +246,7 @@ def startplayback(args): soup = BeautifulSoup(html, "html.parser") # check if not premium - if ("Diese Folge ist für Abonnenten reserviert" in html) or ("Cet épisode est reservé à nos abonnés" in html) or ("This episode is reserved for our subscribers" in html): + if ("Diese Folge ist für Abonnenten reserviert" in html) or ("Cet épisode est reservé à nos abonnés" in html) or ("This episode is reserved for our subscribers" in html) or ("Эта серия зарезервирована для наших подписчиков" in html): xbmc.log("[PLUGIN] %s: You need to own this video or be a premium member '%s'" % (args._addonname, args.url), xbmc.LOGERROR) xbmcgui.Dialog().ok(args._addonname, args._addon.getLocalizedString(30043)) return @@ -270,9 +270,9 @@ def startplayback(args): return # using stream with hls+aes - if ("Benutzer wechseln" in html) or ("Changer de lecteur" in html) or ("Change user" in html): + if ("Benutzer wechseln" in html) or ("Changer de lecteur" in html) or ("Change user" in html) or ("Переключить плеер" in html): # streaming is only for premium subscription - if (("<span>Kostenlos</span>" in html) or ("<span>Gratuit</span>" in html) or ("<span>Free</span>" in html)) and not ("episode_premium_title" in html): + if (("<span>Kostenlos</span>" in html) or ("<span>Gratuit</span>" in html) or ("<span>Free</span>" in html) or ("<span>Бесплатный аккаунт</span>" in html)) and not ("episode_premium_title" in html): xbmc.log("[PLUGIN] %s: You need to own this video or be a premium member '%s'" % (args._addonname, args.url), xbmc.LOGERROR) xbmcgui.Dialog().ok(args._addonname, args._addon.getLocalizedString(30043)) return diff --git a/plugin.video.wakanim/resources/lib/view.py b/plugin.video.wakanim/resources/lib/view.py index c8a00ff..75f7e58 100644 --- a/plugin.video.wakanim/resources/lib/view.py +++ b/plugin.video.wakanim/resources/lib/view.py @@ -76,6 +76,9 @@ def add_item(args, info, isFolder=True, total_items=0, mediatype="video"): totalItems = total_items) +def quote_value(value): + return urllib.quote_plus(value.encode("utf8") if isinstance(value, unicode) else value) + def build_url(args, info): """Create url """ @@ -83,12 +86,12 @@ def build_url(args, info): # step 1 copy new information from info for key, value in info.iteritems(): if value: - s = s + "&" + key + "=" + urllib.quote_plus(value) + s = s + "&" + key + "=" + quote_value(value) # step 2 copy old information from args, but don't append twice for key, value in args.__dict__.iteritems(): if value and key in types and not "&" + str(key) + "=" in s: - s = s + "&" + key + "=" + urllib.quote_plus(value) + s = s + "&" + key + "=" + quote_value(value) return sys.argv[0] + "?" + s[1:] diff --git a/plugin.video.wakanim/resources/lib/wakanim.py b/plugin.video.wakanim/resources/lib/wakanim.py index 3c53fcb..688ce39 100644 --- a/plugin.video.wakanim/resources/lib/wakanim.py +++ b/plugin.video.wakanim/resources/lib/wakanim.py @@ -44,6 +44,8 @@ def main(): args._country = "fr" elif args._country == "2": args._country = "sc" + elif args._country == "3": + args._country = "ru" else: args._country = "de" |