mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
753a6fc591
commit
97c5ec3c83
@ -67,10 +67,6 @@ class BaiduV1(Tse):
|
||||
super().__init__()
|
||||
self.host_url = "https://fanyi.baidu.com"
|
||||
self.api_url = "https://fanyi.baidu.com/transapi"
|
||||
self.get_lang_url = None
|
||||
self.get_lang_url_pattern = (
|
||||
"https://fanyi-cdn.cdn.bcebos.com/webStatic/translation/js/index.(.*?).js"
|
||||
)
|
||||
self.host_headers = self.get_headers(self.host_url, if_api=False)
|
||||
self.api_headers = self.get_headers(self.host_url, if_api=True)
|
||||
self.language_map = None
|
||||
@ -144,11 +140,6 @@ class BaiduV1(Tse):
|
||||
).text
|
||||
# self.language_map = self.get_language_map(host_html, from_language=from_language, to_language=to_language)
|
||||
|
||||
if not self.get_lang_url:
|
||||
self.get_lang_url = (
|
||||
re.compile(self.get_lang_url_pattern).search(host_html).group()
|
||||
)
|
||||
|
||||
form_data = {
|
||||
"from": from_language,
|
||||
"to": to_language,
|
||||
|
Loading…
x
Reference in New Issue
Block a user