mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
Revert "depracate"
This reverts commit aae0785f691fbb8f4417b2765f4844074529e02d.
This commit is contained in:
parent
2436e078d6
commit
bdcae13cf6
624
LunaTranslator/LunaTranslator/cishu/mojidict.py
Normal file
624
LunaTranslator/LunaTranslator/cishu/mojidict.py
Normal file
@ -0,0 +1,624 @@
|
||||
import requests, re, json
|
||||
|
||||
from cishu.cishubase import cishubase
|
||||
|
||||
|
||||
def mojiclicksearch(self,word):
|
||||
|
||||
headers = {
|
||||
"accept": "*/*",
|
||||
"accept-language": "zh-CN,zh;q=0.9,ar;q=0.8,sq;q=0.7,ru;q=0.6",
|
||||
"content-type": "text/plain",
|
||||
"origin": "https://www.mojidict.com",
|
||||
"priority": "u=1, i",
|
||||
"referer": "https://www.mojidict.com/",
|
||||
"sec-ch-ua": '"Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
"sec-fetch-dest": "empty",
|
||||
"sec-fetch-mode": "cors",
|
||||
"sec-fetch-site": "same-site",
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
|
||||
}
|
||||
data = json.dumps(
|
||||
{
|
||||
"searchText": word,
|
||||
"langEnv": "zh-CN_ja",
|
||||
"_SessionToken": "r:718e90d7837c22ac48f71d000d0a62f4",
|
||||
"_ClientVersion": "js3.4.1",
|
||||
"_ApplicationId": "E62VyFVLMiW7kvbtVq3p",
|
||||
"g_os": "PCWeb",
|
||||
"g_ver": "v4.8.1.20240522",
|
||||
"_InstallationId": "101241e8-4004-40b2-a040-f6839ed76d32",
|
||||
},
|
||||
ensure_ascii=False,
|
||||
).encode()
|
||||
|
||||
response = requests.post(
|
||||
"https://api.mojidict.com/parse/functions/word-clickSearchV2",
|
||||
headers=headers,
|
||||
data=data,
|
||||
proxies=self.proxy,
|
||||
)
|
||||
|
||||
result = response.json()["result"]["result"]
|
||||
word = result["word"]
|
||||
|
||||
subdetails = result["subdetails"]
|
||||
collect = []
|
||||
relaid = []
|
||||
|
||||
for subdetail in subdetails:
|
||||
title = subdetail["title"]
|
||||
# print(title,subdetail)
|
||||
|
||||
good = False
|
||||
for i in range(len(relaid)):
|
||||
if relaid[i] == subdetail["relaId"]:
|
||||
if subdetail["lang"] == "zh-CN":
|
||||
collect[i] = title + collect[i]
|
||||
elif subdetail["lang"] == "ja":
|
||||
title = f"({title})"
|
||||
collect[i] = collect[i] + title
|
||||
good = True
|
||||
if not good:
|
||||
collect.append(title)
|
||||
relaid.append(subdetail["relaId"])
|
||||
# print('\n'.join(collect))
|
||||
excerpt = word[0]["excerpt"]
|
||||
accent = word[0]["accent"]
|
||||
spell = word[0]["spell"]
|
||||
pron = word[0]["pron"]
|
||||
style = r"""
|
||||
|
||||
<style>
|
||||
.cloud-result p{
|
||||
--color-grey: #dcdfe6;
|
||||
--color-grey-secondary: #8b8787;
|
||||
--color-grey-third: #acacac;
|
||||
--color-grey-fourth: #e4e4e4;
|
||||
--color-grey-fifth: #d8d8d8;
|
||||
--color-grey-sixth: #d1d1d1;
|
||||
--color-black-primary: #606266;
|
||||
--color-primary: #ff5252;
|
||||
--bg-primary: #ff3a3a;
|
||||
--border-bar: #e7e7e7;
|
||||
--color-blue-description: #46a3f4;
|
||||
--bg-switch-core-active: #ff5252;
|
||||
--bg-scrollbar: hsla(0,0%,67%,.5);
|
||||
--input-split: #ececec;
|
||||
--filter-icon: invert(0);
|
||||
--content-color: #3a3a3a;
|
||||
--color: #3d454c;
|
||||
--color-desc: #8b8787;
|
||||
--color-secondary: #5a5e66;
|
||||
--bg: #f8f8f8;
|
||||
--bg-secondary: #fff;
|
||||
--bg-third: #f1f1f1;
|
||||
--bg-fourth: #fff;
|
||||
--bg-fifth: #fff5f5;
|
||||
--bg-sixth: #d8d8d8;
|
||||
--bg-seventh: #f8f8f8;
|
||||
--bg-icon: #e4e4e4;
|
||||
--bg-hover-primary: #ff3a3a;
|
||||
--border-color: #dcdfe6;
|
||||
--border-color-primary: #ffcbcb;
|
||||
--border-color-secondary: #ffb7b7;
|
||||
--border-color-third: #ececec;
|
||||
--btn-border: #ffcbcb;
|
||||
--btn-primary-secondary: #ffd8d8;
|
||||
--btn-color: #ff3a3a;
|
||||
--btn-bg: #fff5f5;
|
||||
--folder: #ffe88c;
|
||||
--border: #ececec;
|
||||
--hr: #d8d8d8;
|
||||
--bg-input: #f9f9f9;
|
||||
--border-input: #dfdfdf;
|
||||
--hover-color: rgba(0,0,0,.04);
|
||||
--border-btn-basic: #ff3a3a;
|
||||
--color-slider: #ececec;
|
||||
--bg-tag: rgba(0,0,0,.04);
|
||||
--bg-card-hover: #fff;
|
||||
--bg-image: #ececec;
|
||||
--search-input-border: #3b3b3b;
|
||||
--boxshadow-search: #ececec;
|
||||
--bg-search-input: #fff;
|
||||
--bg-setting-card: #fff;
|
||||
--bg-slider: #f8f8f8;
|
||||
--bg-slider-active: #fff;
|
||||
--bg-switch: #f8f8f8;
|
||||
--bg-switch-core: #ececec;
|
||||
--border-tag: #acacac;
|
||||
--bg-article-translation: rgba(0,0,0,.02);
|
||||
--content-hover-bg: #ffcbcb;
|
||||
--bg-radio: #ff5252;
|
||||
--radio-color: #fff;
|
||||
--bg-chunk-yellow: #fae6b8;
|
||||
--bg-chunk-blue: #ececec;
|
||||
--bg-chunk-gray: #ececec;
|
||||
--bg-chunk-orange: #fae6b8;
|
||||
--border-chunk-color-gray: #ccc;
|
||||
--border-chunk-color-orange: #ffc84a;
|
||||
--content-color-analysis: #3a3a3a;
|
||||
--color-gray: #8b8787;
|
||||
--bg-radio-second: #1c1c1e;
|
||||
font-family: -apple-system,PingFangSC-Regular,AlibabaPuHuiTi,Microsoft Yahei,黑体,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
color: var(--color);
|
||||
font-size: 14px;
|
||||
white-space: normal;
|
||||
box-sizing: border-box;
|
||||
margin: 0 0 6px;
|
||||
}
|
||||
.cloud-result .type{
|
||||
--color-grey: #dcdfe6;
|
||||
--color-grey-secondary: #8b8787;
|
||||
--color-grey-third: #acacac;
|
||||
--color-grey-fourth: #e4e4e4;
|
||||
--color-grey-fifth: #d8d8d8;
|
||||
--color-grey-sixth: #d1d1d1;
|
||||
--color-black-primary: #606266;
|
||||
--color-primary: #ff5252;
|
||||
--bg-primary: #ff3a3a;
|
||||
--border-bar: #e7e7e7;
|
||||
--color-blue-description: #46a3f4;
|
||||
--bg-switch-core-active: #ff5252;
|
||||
--bg-scrollbar: hsla(0,0%,67%,.5);
|
||||
--input-split: #ececec;
|
||||
--filter-icon: invert(0);
|
||||
--content-color: #3a3a3a;
|
||||
--color: #3d454c;
|
||||
--color-desc: #8b8787;
|
||||
--color-secondary: #5a5e66;
|
||||
--bg: #f8f8f8;
|
||||
--bg-secondary: #fff;
|
||||
--bg-third: #f1f1f1;
|
||||
--bg-fourth: #fff;
|
||||
--bg-fifth: #fff5f5;
|
||||
--bg-sixth: #d8d8d8;
|
||||
--bg-seventh: #f8f8f8;
|
||||
--bg-icon: #e4e4e4;
|
||||
--bg-hover-primary: #ff3a3a;
|
||||
--border-color: #dcdfe6;
|
||||
--border-color-primary: #ffcbcb;
|
||||
--border-color-secondary: #ffb7b7;
|
||||
--border-color-third: #ececec;
|
||||
--btn-border: #ffcbcb;
|
||||
--btn-primary-secondary: #ffd8d8;
|
||||
--btn-color: #ff3a3a;
|
||||
--btn-bg: #fff5f5;
|
||||
--folder: #ffe88c;
|
||||
--border: #ececec;
|
||||
--hr: #d8d8d8;
|
||||
--bg-input: #f9f9f9;
|
||||
--border-input: #dfdfdf;
|
||||
--hover-color: rgba(0,0,0,.04);
|
||||
--border-btn-basic: #ff3a3a;
|
||||
--color-slider: #ececec;
|
||||
--bg-tag: rgba(0,0,0,.04);
|
||||
--bg-card-hover: #fff;
|
||||
--bg-image: #ececec;
|
||||
--search-input-border: #3b3b3b;
|
||||
--boxshadow-search: #ececec;
|
||||
--bg-search-input: #fff;
|
||||
--bg-setting-card: #fff;
|
||||
--bg-slider: #f8f8f8;
|
||||
--bg-slider-active: #fff;
|
||||
--bg-switch: #f8f8f8;
|
||||
--bg-switch-core: #ececec;
|
||||
--border-tag: #acacac;
|
||||
--bg-article-translation: rgba(0,0,0,.02);
|
||||
--content-hover-bg: #ffcbcb;
|
||||
--bg-radio: #ff5252;
|
||||
--radio-color: #fff;
|
||||
--bg-chunk-yellow: #fae6b8;
|
||||
--bg-chunk-blue: #ececec;
|
||||
--bg-chunk-gray: #ececec;
|
||||
--bg-chunk-orange: #fae6b8;
|
||||
--border-chunk-color-gray: #ccc;
|
||||
--border-chunk-color-orange: #ffc84a;
|
||||
--content-color-analysis: #3a3a3a;
|
||||
--color-gray: #8b8787;
|
||||
--bg-radio-second: #1c1c1e;
|
||||
font-family: -apple-system,PingFangSC-Regular,AlibabaPuHuiTi,Microsoft Yahei,黑体,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
color: var(--color);
|
||||
font-size: 14px;
|
||||
white-space: normal;
|
||||
box-sizing: border-box;
|
||||
margin: 0 0 6px;
|
||||
}
|
||||
.cloud-result .detail{
|
||||
--color-grey: #dcdfe6;
|
||||
--color-grey-secondary: #8b8787;
|
||||
--color-grey-third: #acacac;
|
||||
--color-grey-fourth: #e4e4e4;
|
||||
--color-grey-fifth: #d8d8d8;
|
||||
--color-grey-sixth: #d1d1d1;
|
||||
--color-black-primary: #606266;
|
||||
--color-primary: #ff5252;
|
||||
--bg-primary: #ff3a3a;
|
||||
--border-bar: #e7e7e7;
|
||||
--color-blue-description: #46a3f4;
|
||||
--bg-switch-core-active: #ff5252;
|
||||
--bg-scrollbar: hsla(0,0%,67%,.5);
|
||||
--input-split: #ececec;
|
||||
--filter-icon: invert(0);
|
||||
--content-color: #3a3a3a;
|
||||
--color: #3d454c;
|
||||
--color-desc: #8b8787;
|
||||
--color-secondary: #5a5e66;
|
||||
--bg: #f8f8f8;
|
||||
--bg-secondary: #fff;
|
||||
--bg-third: #f1f1f1;
|
||||
--bg-fourth: #fff;
|
||||
--bg-fifth: #fff5f5;
|
||||
--bg-sixth: #d8d8d8;
|
||||
--bg-seventh: #f8f8f8;
|
||||
--bg-icon: #e4e4e4;
|
||||
--bg-hover-primary: #ff3a3a;
|
||||
--border-color: #dcdfe6;
|
||||
--border-color-primary: #ffcbcb;
|
||||
--border-color-secondary: #ffb7b7;
|
||||
--border-color-third: #ececec;
|
||||
--btn-border: #ffcbcb;
|
||||
--btn-primary-secondary: #ffd8d8;
|
||||
--btn-color: #ff3a3a;
|
||||
--btn-bg: #fff5f5;
|
||||
--folder: #ffe88c;
|
||||
--border: #ececec;
|
||||
--hr: #d8d8d8;
|
||||
--bg-input: #f9f9f9;
|
||||
--border-input: #dfdfdf;
|
||||
--hover-color: rgba(0,0,0,.04);
|
||||
--border-btn-basic: #ff3a3a;
|
||||
--color-slider: #ececec;
|
||||
--bg-tag: rgba(0,0,0,.04);
|
||||
--bg-card-hover: #fff;
|
||||
--bg-image: #ececec;
|
||||
--search-input-border: #3b3b3b;
|
||||
--boxshadow-search: #ececec;
|
||||
--bg-search-input: #fff;
|
||||
--bg-setting-card: #fff;
|
||||
--bg-slider: #f8f8f8;
|
||||
--bg-slider-active: #fff;
|
||||
--bg-switch: #f8f8f8;
|
||||
--bg-switch-core: #ececec;
|
||||
--border-tag: #acacac;
|
||||
--bg-article-translation: rgba(0,0,0,.02);
|
||||
--content-hover-bg: #ffcbcb;
|
||||
--bg-radio: #ff5252;
|
||||
--radio-color: #fff;
|
||||
--bg-chunk-yellow: #fae6b8;
|
||||
--bg-chunk-blue: #ececec;
|
||||
--bg-chunk-gray: #ececec;
|
||||
--bg-chunk-orange: #fae6b8;
|
||||
--border-chunk-color-gray: #ccc;
|
||||
--border-chunk-color-orange: #ffc84a;
|
||||
--content-color-analysis: #3a3a3a;
|
||||
--color-gray: #8b8787;
|
||||
--bg-radio-second: #1c1c1e;
|
||||
font-family: -apple-system,PingFangSC-Regular,AlibabaPuHuiTi,Microsoft Yahei,黑体,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
color: var(--color);
|
||||
font-size: 14px;
|
||||
white-space: normal;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
}
|
||||
.cloud-result .spell{
|
||||
--color-grey: #dcdfe6;
|
||||
--color-grey-secondary: #8b8787;
|
||||
--color-grey-third: #acacac;
|
||||
--color-grey-fourth: #e4e4e4;
|
||||
--color-grey-fifth: #d8d8d8;
|
||||
--color-grey-sixth: #d1d1d1;
|
||||
--color-black-primary: #606266;
|
||||
--color-primary: #ff5252;
|
||||
--bg-primary: #ff3a3a;
|
||||
--border-bar: #e7e7e7;
|
||||
--color-blue-description: #46a3f4;
|
||||
--bg-switch-core-active: #ff5252;
|
||||
--bg-scrollbar: hsla(0,0%,67%,.5);
|
||||
--input-split: #ececec;
|
||||
--filter-icon: invert(0);
|
||||
--content-color: #3a3a3a;
|
||||
--color: #3d454c;
|
||||
--color-desc: #8b8787;
|
||||
--color-secondary: #5a5e66;
|
||||
--bg: #f8f8f8;
|
||||
--bg-secondary: #fff;
|
||||
--bg-third: #f1f1f1;
|
||||
--bg-fourth: #fff;
|
||||
--bg-fifth: #fff5f5;
|
||||
--bg-sixth: #d8d8d8;
|
||||
--bg-seventh: #f8f8f8;
|
||||
--bg-icon: #e4e4e4;
|
||||
--bg-hover-primary: #ff3a3a;
|
||||
--border-color: #dcdfe6;
|
||||
--border-color-primary: #ffcbcb;
|
||||
--border-color-secondary: #ffb7b7;
|
||||
--border-color-third: #ececec;
|
||||
--btn-border: #ffcbcb;
|
||||
--btn-primary-secondary: #ffd8d8;
|
||||
--btn-color: #ff3a3a;
|
||||
--btn-bg: #fff5f5;
|
||||
--folder: #ffe88c;
|
||||
--border: #ececec;
|
||||
--hr: #d8d8d8;
|
||||
--bg-input: #f9f9f9;
|
||||
--border-input: #dfdfdf;
|
||||
--hover-color: rgba(0,0,0,.04);
|
||||
--border-btn-basic: #ff3a3a;
|
||||
--color-slider: #ececec;
|
||||
--bg-tag: rgba(0,0,0,.04);
|
||||
--bg-card-hover: #fff;
|
||||
--bg-image: #ececec;
|
||||
--search-input-border: #3b3b3b;
|
||||
--boxshadow-search: #ececec;
|
||||
--bg-search-input: #fff;
|
||||
--bg-setting-card: #fff;
|
||||
--bg-slider: #f8f8f8;
|
||||
--bg-slider-active: #fff;
|
||||
--bg-switch: #f8f8f8;
|
||||
--bg-switch-core: #ececec;
|
||||
--border-tag: #acacac;
|
||||
--bg-article-translation: rgba(0,0,0,.02);
|
||||
--content-hover-bg: #ffcbcb;
|
||||
--bg-radio: #ff5252;
|
||||
--radio-color: #fff;
|
||||
--bg-chunk-yellow: #fae6b8;
|
||||
--bg-chunk-blue: #ececec;
|
||||
--bg-chunk-gray: #ececec;
|
||||
--bg-chunk-orange: #fae6b8;
|
||||
--border-chunk-color-gray: #ccc;
|
||||
--border-chunk-color-orange: #ffc84a;
|
||||
--content-color-analysis: #3a3a3a;
|
||||
--color-gray: #8b8787;
|
||||
--bg-radio-second: #1c1c1e;
|
||||
font-family: -apple-system,PingFangSC-Regular,AlibabaPuHuiTi,Microsoft Yahei,黑体,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
color: var(--color);
|
||||
white-space: normal;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.cloud-result .spell span{
|
||||
--color-grey: #dcdfe6;
|
||||
--color-grey-secondary: #8b8787;
|
||||
--color-grey-third: #acacac;
|
||||
--color-grey-fourth: #e4e4e4;
|
||||
--color-grey-fifth: #d8d8d8;
|
||||
--color-grey-sixth: #d1d1d1;
|
||||
--color-black-primary: #606266;
|
||||
--color-primary: #ff5252;
|
||||
--bg-primary: #ff3a3a;
|
||||
--border-bar: #e7e7e7;
|
||||
--color-blue-description: #46a3f4;
|
||||
--bg-switch-core-active: #ff5252;
|
||||
--bg-scrollbar: hsla(0,0%,67%,.5);
|
||||
--input-split: #ececec;
|
||||
--filter-icon: invert(0);
|
||||
--content-color: #3a3a3a;
|
||||
--color: #3d454c;
|
||||
--color-desc: #8b8787;
|
||||
--color-secondary: #5a5e66;
|
||||
--bg: #f8f8f8;
|
||||
--bg-secondary: #fff;
|
||||
--bg-third: #f1f1f1;
|
||||
--bg-fourth: #fff;
|
||||
--bg-fifth: #fff5f5;
|
||||
--bg-sixth: #d8d8d8;
|
||||
--bg-seventh: #f8f8f8;
|
||||
--bg-icon: #e4e4e4;
|
||||
--bg-hover-primary: #ff3a3a;
|
||||
--border-color: #dcdfe6;
|
||||
--border-color-primary: #ffcbcb;
|
||||
--border-color-secondary: #ffb7b7;
|
||||
--border-color-third: #ececec;
|
||||
--btn-border: #ffcbcb;
|
||||
--btn-primary-secondary: #ffd8d8;
|
||||
--btn-color: #ff3a3a;
|
||||
--btn-bg: #fff5f5;
|
||||
--folder: #ffe88c;
|
||||
--border: #ececec;
|
||||
--hr: #d8d8d8;
|
||||
--bg-input: #f9f9f9;
|
||||
--border-input: #dfdfdf;
|
||||
--hover-color: rgba(0,0,0,.04);
|
||||
--border-btn-basic: #ff3a3a;
|
||||
--color-slider: #ececec;
|
||||
--bg-tag: rgba(0,0,0,.04);
|
||||
--bg-card-hover: #fff;
|
||||
--bg-image: #ececec;
|
||||
--search-input-border: #3b3b3b;
|
||||
--boxshadow-search: #ececec;
|
||||
--bg-search-input: #fff;
|
||||
--bg-setting-card: #fff;
|
||||
--bg-slider: #f8f8f8;
|
||||
--bg-slider-active: #fff;
|
||||
--bg-switch: #f8f8f8;
|
||||
--bg-switch-core: #ececec;
|
||||
--border-tag: #acacac;
|
||||
--bg-article-translation: rgba(0,0,0,.02);
|
||||
--content-hover-bg: #ffcbcb;
|
||||
--bg-radio: #ff5252;
|
||||
--radio-color: #fff;
|
||||
--bg-chunk-yellow: #fae6b8;
|
||||
--bg-chunk-blue: #ececec;
|
||||
--bg-chunk-gray: #ececec;
|
||||
--bg-chunk-orange: #fae6b8;
|
||||
--border-chunk-color-gray: #ccc;
|
||||
--border-chunk-color-orange: #ffc84a;
|
||||
--content-color-analysis: #3a3a3a;
|
||||
--color-gray: #8b8787;
|
||||
--bg-radio-second: #1c1c1e;
|
||||
font-family: -apple-system,PingFangSC-Regular,AlibabaPuHuiTi,Microsoft Yahei,黑体,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
color: var(--color);
|
||||
white-space: normal;
|
||||
font-size: 18px;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
line-height: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.cloud-result{
|
||||
--color-grey: #dcdfe6;
|
||||
--color-grey-secondary: #8b8787;
|
||||
--color-grey-third: #acacac;
|
||||
--color-grey-fourth: #e4e4e4;
|
||||
--color-grey-fifth: #d8d8d8;
|
||||
--color-grey-sixth: #d1d1d1;
|
||||
--color-black-primary: #606266;
|
||||
--color-primary: #ff5252;
|
||||
--bg-primary: #ff3a3a;
|
||||
--border-bar: #e7e7e7;
|
||||
--color-blue-description: #46a3f4;
|
||||
--bg-switch-core-active: #ff5252;
|
||||
--bg-scrollbar: hsla(0,0%,67%,.5);
|
||||
--input-split: #ececec;
|
||||
--filter-icon: invert(0);
|
||||
--content-color: #3a3a3a;
|
||||
--color: #3d454c;
|
||||
--color-desc: #8b8787;
|
||||
--color-secondary: #5a5e66;
|
||||
--bg: #f8f8f8;
|
||||
--bg-secondary: #fff;
|
||||
--bg-third: #f1f1f1;
|
||||
--bg-fourth: #fff;
|
||||
--bg-fifth: #fff5f5;
|
||||
--bg-sixth: #d8d8d8;
|
||||
--bg-seventh: #f8f8f8;
|
||||
--bg-icon: #e4e4e4;
|
||||
--bg-hover-primary: #ff3a3a;
|
||||
--border-color: #dcdfe6;
|
||||
--border-color-primary: #ffcbcb;
|
||||
--border-color-secondary: #ffb7b7;
|
||||
--border-color-third: #ececec;
|
||||
--btn-border: #ffcbcb;
|
||||
--btn-primary-secondary: #ffd8d8;
|
||||
--btn-color: #ff3a3a;
|
||||
--btn-bg: #fff5f5;
|
||||
--folder: #ffe88c;
|
||||
--border: #ececec;
|
||||
--hr: #d8d8d8;
|
||||
--bg-input: #f9f9f9;
|
||||
--border-input: #dfdfdf;
|
||||
--hover-color: rgba(0,0,0,.04);
|
||||
--border-btn-basic: #ff3a3a;
|
||||
--color-slider: #ececec;
|
||||
--bg-tag: rgba(0,0,0,.04);
|
||||
--bg-card-hover: #fff;
|
||||
--bg-image: #ececec;
|
||||
--search-input-border: #3b3b3b;
|
||||
--boxshadow-search: #ececec;
|
||||
--bg-search-input: #fff;
|
||||
--bg-setting-card: #fff;
|
||||
--bg-slider: #f8f8f8;
|
||||
--bg-slider-active: #fff;
|
||||
--bg-switch: #f8f8f8;
|
||||
--bg-switch-core: #ececec;
|
||||
--border-tag: #acacac;
|
||||
--bg-article-translation: rgba(0,0,0,.02);
|
||||
--content-hover-bg: #ffcbcb;
|
||||
--bg-radio: #ff5252;
|
||||
--radio-color: #fff;
|
||||
--bg-chunk-yellow: #fae6b8;
|
||||
--bg-chunk-blue: #ececec;
|
||||
--bg-chunk-gray: #ececec;
|
||||
--bg-chunk-orange: #fae6b8;
|
||||
--border-chunk-color-gray: #ccc;
|
||||
--border-chunk-color-orange: #ffc84a;
|
||||
--content-color-analysis: #3a3a3a;
|
||||
--color-gray: #8b8787;
|
||||
--bg-radio-second: #1c1c1e;
|
||||
font-family: -apple-system,PingFangSC-Regular,AlibabaPuHuiTi,Microsoft Yahei,黑体,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
color: var(--color);
|
||||
font-size: 14px;
|
||||
white-space: normal;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
"""
|
||||
spell = f"<span>{spell}|{pron}{accent}</span>"
|
||||
spell = f'<div class="spell" style="font-size: 18px;">{spell}</div>'
|
||||
_type = re.match("\\[(.*?)\\]", excerpt).groups()[0]
|
||||
_type = f'<p class="type">{_type}</p>'
|
||||
|
||||
for i in range(len(collect)):
|
||||
collect[i] = f"<p>{i+1}. {collect[i]}</p>"
|
||||
detail = f"""<div class="detail">{_type}{''.join(collect)}</div>"""
|
||||
result = f'<div class="cloud-result">{spell}{detail}</div>'
|
||||
result += style
|
||||
return result
|
||||
|
||||
|
||||
def mojizonghe(self,word):
|
||||
response = requests.post(
|
||||
"https://api.mojidict.com/parse/functions/union-api",
|
||||
json={
|
||||
"functions": [
|
||||
{
|
||||
"name": "search-all",
|
||||
"params": {
|
||||
"text": word,
|
||||
"types": [
|
||||
102,
|
||||
106,
|
||||
103,
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
"_ApplicationId": "E62VyFVLMiW7kvbtVq3p",
|
||||
},
|
||||
headers={
|
||||
"content-type": "text/plain",
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
|
||||
},
|
||||
proxies=self.proxy,
|
||||
)
|
||||
|
||||
result = ""
|
||||
for i in response.json()["result"]["results"]["search-all"]["result"]["word"][
|
||||
"searchResult"
|
||||
]:
|
||||
result += "{}<br>{}<br><br>".format(i["title"], i["excerpt"])
|
||||
|
||||
return result
|
||||
|
||||
|
||||
class mojidict(cishubase):
|
||||
def search(self, word):
|
||||
|
||||
result = ""
|
||||
try:
|
||||
result += mojiclicksearch(self,word)
|
||||
result += "<br>"
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
result += mojizonghe(self,word)
|
||||
except:
|
||||
pass
|
||||
return result
|
@ -1334,6 +1334,11 @@
|
||||
},
|
||||
"type": "offline"
|
||||
},
|
||||
"mojidict": {
|
||||
"use": false,
|
||||
"name": "Moji辞书",
|
||||
"useproxy": false
|
||||
},
|
||||
"youdao": {
|
||||
"use": false,
|
||||
"name": "有道词典",
|
||||
|
@ -184,6 +184,7 @@
|
||||
"使用代理": "استخدام وكيل",
|
||||
"使用代理的项目": "استخدام وكيل المشروع",
|
||||
"优先录制的翻译源": "يفضل تسجيل مصدر الترجمة",
|
||||
"Moji辞书": "معجم موجي",
|
||||
"显示错误信息": "عرض رسالة خطأ",
|
||||
"水奈瀬コウ": "شوي ناي",
|
||||
"Unicode范围": "يونيكود مجموعة",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "辭書",
|
||||
"分词": "分詞",
|
||||
"过滤尖括号<>": "過濾角括弧 <>",
|
||||
"Moji辞书": "MOJi 辭書",
|
||||
"清空": "清空",
|
||||
"不显示原文": "不顯示原文",
|
||||
"不显示api": "不顯示 API",
|
||||
|
@ -399,6 +399,7 @@
|
||||
"飞书": "anonymní dopis",
|
||||
"用户词典选择JcUserdic文件夹": "Vyberte složku JcUserdic z uživatelského slovníku",
|
||||
"缩放时禁用窗口大小调整": "Zakázat změnu velikosti okna během škálování",
|
||||
"Moji辞书": "Slovník Moji",
|
||||
"删除": "smazat",
|
||||
"图像一致性阈值": "Prahová hodnota konzistence obrazu",
|
||||
"封面": "kryt",
|
||||
|
@ -399,6 +399,7 @@
|
||||
"飞书": "anonymer Brief",
|
||||
"用户词典选择JcUserdic文件夹": "Wählen Sie den Ordner JcUserdic aus dem Benutzerwörterbuch aus",
|
||||
"缩放时禁用窗口大小调整": "Fenstergröße während der Skalierung deaktivieren",
|
||||
"Moji辞书": "Moji-Wörterbuch",
|
||||
"删除": "löschen",
|
||||
"图像一致性阈值": "Schwellenwert für Bildkonsistenz",
|
||||
"封面": "Abdeckung",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "Dictionary",
|
||||
"分词": "Tokenization",
|
||||
"过滤尖括号<>": "Filter Angle Brackets <>",
|
||||
"Moji辞书": "Moji Dictionary",
|
||||
"清空": "Clear",
|
||||
"不显示原文": "Don't Display Original Text",
|
||||
"不显示api": "Don't Display API",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "Diccionario",
|
||||
"分词": "Participio",
|
||||
"过滤尖括号<>": "Soporte puntiagudo de filtro < >",
|
||||
"Moji辞书": "Moji dict",
|
||||
"清空": "Vaciado",
|
||||
"不显示原文": "No muestra el texto original",
|
||||
"不显示api": "No muestra APIS",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "Dictionnaire",
|
||||
"分词": "Participant",
|
||||
"过滤尖括号<>": "Filtrer les crochets d'angle < >",
|
||||
"Moji辞书": "Moji dict",
|
||||
"清空": "Vider",
|
||||
"不显示原文": "Ne pas afficher l'original",
|
||||
"不显示api": "Ne pas afficher l'API",
|
||||
|
@ -215,6 +215,7 @@
|
||||
"辞书": "Dizionario",
|
||||
"分词": "participio",
|
||||
"过滤尖括号<>": "Parentes angolari del filtro<>",
|
||||
"Moji辞书": "Dizionario Moji",
|
||||
"清空": "vuoto",
|
||||
"不显示原文": "Non visualizzare il testo originale",
|
||||
"不显示api": "Non visualizzare API",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "辞書",
|
||||
"分词": "分詞",
|
||||
"过滤尖括号<>": "フィルタ山括弧<>",
|
||||
"Moji辞书": "Moji辞書",
|
||||
"清空": "クリアランス",
|
||||
"不显示原文": "テキストを表示しない",
|
||||
"不显示api": "apiを表示しない",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "사서",
|
||||
"分词": "분사",
|
||||
"过滤尖括号<>": "괄호 필터링 <>",
|
||||
"Moji辞书": "Moji dict",
|
||||
"清空": "비우기",
|
||||
"不显示原文": "원문을 나타내지 않다",
|
||||
"不显示api": "api 표시 안 함",
|
||||
|
@ -399,6 +399,7 @@
|
||||
"飞书": "anonieme brief",
|
||||
"用户词典选择JcUserdic文件夹": "Selecteer de map JcUserdic uit het gebruikerswoordenboek",
|
||||
"缩放时禁用窗口大小调整": "Venstergrootte tijdens schalen uitschakelen",
|
||||
"Moji辞书": "Moji-woordenboek",
|
||||
"删除": "verwijderen",
|
||||
"图像一致性阈值": "Drempelwaarde beeldconsistentie",
|
||||
"封面": "dekking",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "Słownik",
|
||||
"分词": "uczestnik",
|
||||
"过滤尖括号<>": "Nawiasy kąta filtra<>",
|
||||
"Moji辞书": "Słownik Moji",
|
||||
"清空": "pusty",
|
||||
"不显示原文": "Nie wyświetlaj oryginalnego tekstu",
|
||||
"不显示api": "Nie wyświetlaj interfejsu API",
|
||||
|
@ -399,6 +399,7 @@
|
||||
"飞书": "carta anónima",
|
||||
"用户词典选择JcUserdic文件夹": "Seleccione a pasta JcUserdic no dicionário do utilizador",
|
||||
"缩放时禁用窗口大小调整": "Desactivar o redimensionamento da janela durante a escala",
|
||||
"Moji辞书": "Dicionário Moji",
|
||||
"删除": "apagar",
|
||||
"图像一致性阈值": "Limiar de consistência da imagem",
|
||||
"封面": "capa",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "Словарь",
|
||||
"分词": "Фрагмент",
|
||||
"过滤尖括号<>": "Фильтр острых скобок < >",
|
||||
"Moji辞书": "Moji dict",
|
||||
"清空": "Очистить",
|
||||
"不显示原文": "Не показывать оригинал",
|
||||
"不显示api": "Не показывать API",
|
||||
|
@ -399,6 +399,7 @@
|
||||
"飞书": "anonymt brev",
|
||||
"用户词典选择JcUserdic文件夹": "Välj katalogen JcUserdic från användarordlistan",
|
||||
"缩放时禁用窗口大小调整": "Inaktivera fönstrets storlek under skalning",
|
||||
"Moji辞书": "Mojiordbok",
|
||||
"删除": "ta bort",
|
||||
"图像一致性阈值": "Tröskelvärde för bildkonsistens",
|
||||
"封面": "omslag",
|
||||
|
@ -399,6 +399,7 @@
|
||||
"飞书": "หนังสือบิน",
|
||||
"用户词典选择JcUserdic文件夹": "พจนานุกรมผู้ใช้เลือกโฟลเดอร์ JcUserdic",
|
||||
"缩放时禁用窗口大小调整": "ปิดการปรับขนาดหน้าต่างเมื่อซูม",
|
||||
"Moji辞书": "ใบลาออกของโมจิ",
|
||||
"删除": "ลบ",
|
||||
"图像一致性阈值": "เกณฑ์ความสอดคล้องของภาพ",
|
||||
"封面": "ปก",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "Sözlük",
|
||||
"分词": "participle",
|
||||
"过滤尖括号<>": "Süzgüç bracketleri < >",
|
||||
"Moji辞书": "Moji Sözlük",
|
||||
"清空": "boş",
|
||||
"不显示原文": "Önce metini gösterme",
|
||||
"不显示api": "api gösterme",
|
||||
|
@ -215,6 +215,7 @@
|
||||
"辞书": "Словник",
|
||||
"分词": "частинка",
|
||||
"过滤尖括号<>": "Фільтрувати дужки кутів<>",
|
||||
"Moji辞书": "Словник Moji",
|
||||
"清空": "порожній",
|
||||
"不显示原文": "Не показувати початковий текст",
|
||||
"不显示api": "Не показувати API",
|
||||
|
@ -219,6 +219,7 @@
|
||||
"辞书": "Thư từ",
|
||||
"分词": "Phân từ",
|
||||
"过滤尖括号<>": "Lọc ngoặc nhọn<>",
|
||||
"Moji辞书": "Từ điển Moji",
|
||||
"清空": "Trống rỗng",
|
||||
"不显示原文": "Không hiển thị bản gốc",
|
||||
"不显示api": "Không hiển thị API",
|
||||
|
@ -399,6 +399,7 @@
|
||||
"飞书": "",
|
||||
"用户词典选择JcUserdic文件夹": "",
|
||||
"缩放时禁用窗口大小调整": "",
|
||||
"Moji辞书": "",
|
||||
"删除": "",
|
||||
"图像一致性阈值": "",
|
||||
"封面": "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user