Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
test123456654321 committed Oct 28, 2024
1 parent 50d2550 commit a34b0d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/LunaTranslator/cishu/japandict.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def makelinkbase64(self, link, saver):
html = requests.get(
link,
proxies=self.proxy,
).content
).content.replace(b"padding-top:60px !important", b"")
base64_content = base64.b64encode(html).decode("utf-8")
saver[link] = f"data:application/octet-stream;base64,{base64_content}"

Expand All @@ -21,8 +21,11 @@ def search(self, word):
proxies=self.proxy,
).text

check = get_element_by("class", "alert-heading", html)
if check:
return
res = get_element_by("class", "list-group list-group-flush", html)
if res is None:
if not res:
return
ts = []
saver = {}
Expand Down
2 changes: 1 addition & 1 deletion src/LunaTranslator/cishu/jisho.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def paradown(self, word, key, saver):
if get_element_by("id", "no-matches", html):
return
res = get_element_by("id", "page_container", html)
if res is None:
if not res:
return
res = (
res.replace('href="//', 'href="https://')
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include(generate_product_version)

set(VERSION_MAJOR 5)
set(VERSION_MINOR 52)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)

add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h)
Expand Down

0 comments on commit a34b0d3

Please sign in to comment.