FastWordQuery icon indicating copy to clipboard operation
FastWordQuery copied to clipboard

Please add stroke order when use baidu chinese

Open yangyunzhao opened this issue 5 years ago • 0 comments

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 ''

yangyunzhao avatar Mar 01 '20 03:03 yangyunzhao