Update jisho.py

This commit is contained in:
恍兮惚兮 2024-05-22 02:30:53 +08:00
parent e75b1086f1
commit ba7e71452b

View File

@ -89,7 +89,13 @@ class jisho(cishubase):
res = get_element_by_id("page_container", html) res = get_element_by_id("page_container", html)
if res is None: if res is None:
return return
res = res.replace('href="//', 'href="https://') res = (
res.replace('href="//', 'href="https://')
.replace("<h3>Discussions</h3>", "")
.replace(
'<a href="#" class="signin">Log in</a> to talk about this word.', ""
)
)
ss = re.search('href="https://assets.jisho.org/assets/application(.*)"', html) ss = re.search('href="https://assets.jisho.org/assets/application(.*)"', html)
stl = requests.get(ss.group()[6:-1], proxies=getproxy()).text stl = requests.get(ss.group()[6:-1], proxies=getproxy()).text