diff options
author | Fanx <[email protected]> | 2023-02-23 04:25:45 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2023-02-22 15:25:45 -0500 |
commit | 72066245e0a5b6a27d93cc46245403e309ee4b35 (patch) | |
tree | e7551be8034df21a81c9d4719bee58403c341e20 | |
parent | 68a0d787256f73982da0bc34020d102a9d69ed0f (diff) | |
download | bazarr-72066245e0a5b6a27d93cc46245403e309ee4b35.tar.gz bazarr-72066245e0a5b6a27d93cc46245403e309ee4b35.zip |
Fixed zimuku 403 error caused by search url changev1.1.5-beta.22
-rw-r--r-- | libs/subliminal_patch/providers/zimuku.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libs/subliminal_patch/providers/zimuku.py b/libs/subliminal_patch/providers/zimuku.py index 469160315..27251e657 100644 --- a/libs/subliminal_patch/providers/zimuku.py +++ b/libs/subliminal_patch/providers/zimuku.py @@ -88,7 +88,7 @@ class ZimukuProvider(Provider): logger.info(str(supported_languages)) server_url = "http://zimuku.org" - search_url = "/search?q={}&vertoken={}" + search_url = "/search?q={}&security_verify_data={}" download_url = "http://zimuku.org/" subtitle_class = ZimukuSubtitle @@ -115,18 +115,12 @@ class ZimukuProvider(Provider): self.session.cookies.set("srcurl", self.stringToHex(r.url)) if(tr): verify_resp = self.session.get( - self.server_url+tr[0]+self.stringToHex("1080,1920"), allow_redirects=False) + self.server_url+tr[0]+self.stringToHex("1920,1080"), allow_redirects=False) if(verify_resp.status_code == 302 and self.session.cookies.get("security_session_verify") != None): pass continue if len(self.location_re.findall(r.text)) == 0: - if(r.headers.get("Content-Type") == "text/html; charset=utf-8"): - v = ParserBeautifulSoup( - r.content.decode("utf-8", "ignore"), ["html.parser"] - ).find( - "input", attrs={'name': 'vertoken'}) - if(v): - self.vertoken = v.get("value") + self.vertoken = self.stringToHex("1920,1080") return r def initialize(self): |