mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-04 05:52:24 +08:00
Fixed zimuku.org parsing error
This commit is contained in:
parent
e83f37d42e
commit
0907269377
1 changed files with 4 additions and 4 deletions
|
@ -143,7 +143,7 @@ class ZimukuProvider(Provider):
|
||||||
self.session.cookies.set("srcurl", string_to_hex(r.url))
|
self.session.cookies.set("srcurl", string_to_hex(r.url))
|
||||||
if tr:
|
if tr:
|
||||||
verify_resp = self.session.get(
|
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 \
|
if verify_resp.status_code == 302 \
|
||||||
and self.session.cookies.get("security_session_verify") is not None:
|
and self.session.cookies.get("security_session_verify") is not None:
|
||||||
pass
|
pass
|
||||||
|
@ -164,7 +164,7 @@ class ZimukuProvider(Provider):
|
||||||
bs_obj = ParserBeautifulSoup(
|
bs_obj = ParserBeautifulSoup(
|
||||||
r.content.decode("utf-8", "ignore"), ["html.parser"]
|
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 = []
|
subs = []
|
||||||
for sub in subs_body.find_all("tr"):
|
for sub in subs_body.find_all("tr"):
|
||||||
a = sub.find("a")
|
a = sub.find("a")
|
||||||
|
@ -208,7 +208,7 @@ class ZimukuProvider(Provider):
|
||||||
|
|
||||||
logger.debug("Searching subtitles %r", params)
|
logger.debug("Searching subtitles %r", params)
|
||||||
subtitles = []
|
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 = self.yunsuo_bypass(search_link, timeout=30)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
|
@ -254,7 +254,7 @@ class ZimukuProvider(Provider):
|
||||||
season_cn2 = num_to_cn(str(season))
|
season_cn2 = num_to_cn(str(season))
|
||||||
if season_cn1 != season_cn2:
|
if season_cn1 != season_cn2:
|
||||||
continue
|
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)
|
new_subs = self._parse_episode_page(episode_link, subs_year)
|
||||||
subtitles += new_subs
|
subtitles += new_subs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue