TA的每日心情 | 奋斗 2020-12-22 18:46 |
---|
签到天数: 43 天 [LV.5]常住居民I
|
发表于 2019-10-29 17:45:28
|
显示全部楼层
大神,我有点没看懂帖子介绍的mac词典导出放大,我在推荐的apple dictionary主页找到了一条py代码并运行,显示出了这样的报错,请问该怎么办!; d8 B; H+ d8 D' {: [
Traceback (most recent call last):
6 Q6 l. {8 B# b+ B1 L( ] File "/Users/xxx/Downloads/macdictexport/0dedict.py", line 31, in <module>
4 x# Q& z, W9 K6 C for word, definition in gen_entry():
9 {/ j d$ c7 f9 K File "/Users/xxx/Downloads/macdictexport/0dedict.py", line 26, in gen_entry
: H2 Z; j& M& M8 v title = re.search('d:title="(.*?)"', entry).group(1)
0 H. n! V4 ~9 Z( ]9 q File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/re.py", line 199, in search* C9 J/ q' Z* X4 K: R3 G2 a5 r& b. [
return _compile(pattern, flags).search(string)( _; E% s* ?, ~7 z- H
TypeError: cannot use a string pattern on a bytes-like object4 H. T9 ~. G0 X- G ~/ @' F3 Q
>>> |
|