summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKai Yang <[email protected]>2023-05-07 20:16:20 +0800
committerGitHub <[email protected]>2023-05-07 08:16:20 -0400
commit0907269377401b64a52589a54431e4ab75a2587a (patch)
treebd17dbcea5bc0671ac44088deae4ccd7494ed600
parente83f37d42ec3a8141ca6b5ca487d0ab200e59cb5 (diff)
downloadbazarr-1.2.2-beta.2.tar.gz
bazarr-1.2.2-beta.2.zip
Fixed zimuku.org parsing errorv1.2.2-beta.2
-rw-r--r--libs/subliminal_patch/providers/zimuku.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/subliminal_patch/providers/zimuku.py b/libs/subliminal_patch/providers/zimuku.py
index 1940f0f1c..99bfb3d6c 100644
--- a/libs/subliminal_patch/providers/zimuku.py
+++ b/libs/subliminal_patch/providers/zimuku.py
@@ -143,7 +143,7 @@ class ZimukuProvider(Provider):
self.session.cookies.set("srcurl", string_to_hex(r.url))
if tr:
verify_resp = self.session.get(
- self.server_url + tr[0] + string_to_hex(self.code), allow_redirects=False)
+ urljoin(self.server_url, tr[0] + string_to_hex(self.code)), allow_redirects=False)
if verify_resp.status_code == 302 \
and self.session.cookies.get("security_session_verify") is not None:
pass
@@ -164,7 +164,7 @@ class ZimukuProvider(Provider):
bs_obj = ParserBeautifulSoup(
r.content.decode("utf-8", "ignore"), ["html.parser"]
)
- subs_body = bs_obj.find("div", class_="subs box clearfix").find("tbody")
+ subs_body = bs_obj.find("tbody")
subs = []
for sub in subs_body.find_all("tr"):
a = sub.find("a")
@@ -208,7 +208,7 @@ class ZimukuProvider(Provider):
logger.debug("Searching subtitles %r", params)
subtitles = []
- search_link = self.server_url + text_type(self.search_url).format(params)
+ search_link = urljoin(self.server_url, text_type(self.search_url).format(params))
r = self.yunsuo_bypass(search_link, timeout=30)
r.raise_for_status()
@@ -254,7 +254,7 @@ class ZimukuProvider(Provider):
season_cn2 = num_to_cn(str(season))
if season_cn1 != season_cn2:
continue
- episode_link = self.server_url + title_a.attrs["href"]
+ episode_link = urljoin(self.server_url, title_a.attrs["href"])
new_subs = self._parse_episode_page(episode_link, subs_year)
subtitles += new_subs