Skip to content

Commit

Permalink
v1.2.1修复bug,务必更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Quan666 committed Apr 21, 2020
1 parent 38935c6 commit 637c676
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@

# MYELF博客地址 https://myelf.club
# 出现问题请在 GitHub 上提 issues
# 项目地址 https://github.com/Quan666/ELF_RSS
# 项目地址 https://github.com/Quan666/ELF_RSS
# v1.2.1
20 changes: 10 additions & 10 deletions include/plugins/RSSHub/rsshub.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ def checkstr(rss_str:str,img_proxy:bool,translation:bool)->str:
else:
rss_str = re.sub(re.escape(str(video)), r'视频封面:\n图片走丢啦!\n', rss_str)
rss_str_tl = re.sub(re.escape(str(video)), '', rss_str_tl)
# 翻译
text = ''
if translation:
translator = Translator()
# rss_str_tl = re.sub(r'\n', ' ', rss_str_tl)
try:
text = '\n翻译:\n' + translator.translate(re.escape(rss_str_tl), dest='zh-CN').text
text = re.sub(r'\\', '', text)
except:
text = '\n翻译失败!请联系管理员!\n'
# 翻译
text = ''
if translation:
translator = Translator()
# rss_str_tl = re.sub(r'\n', ' ', rss_str_tl)
try:
text = '\n翻译:\n' + translator.translate(re.escape(rss_str_tl), dest='zh-CN').text
text = re.sub(r'\\', '', text)
except:
text = '\n翻译失败!请联系管理员!\n'
return rss_str+text


Expand Down

0 comments on commit 637c676

Please sign in to comment.