FastWordQuery
FastWordQuery copied to clipboard
Please add stroke order when use baidu chinese
Is your feature request related to a problem? Please describe. No.
Describe the solution you'd like I have modified the code. Can you integrate it?
#笔顺
element = soup.find('div', id='header-img')
if element:
tag = element.find('img', {'class': 'bishun'})
if tag:
result['fanyi'] = tag.get('data-gif')
@export([u'英文翻译', u'Translation[En]'])
def fld_fanyi(self):
bishun_url = self._get_field('fanyi')
if baidu_download_mp3 and bishun_url:
filename = get_hex_name(self.unique.lower(), bishun_url, 'gif')
if os.path.exists(filename) or self.download(bishun_url, filename):
return self.get_anki_label(filename, 'img')
return ''