This commit is contained in:
guanjihuan 2022-02-26 17:52:21 +08:00
parent ff579a623d
commit c393dc1d1b
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
[metadata] [metadata]
# replace with your username: # replace with your username:
name = guan name = guan
version = 0.0.73 version = 0.0.74
author = guanjihuan author = guanjihuan
author_email = guanjihuan@163.com author_email = guanjihuan@163.com
description = An open source python package description = An open source python package

View File

@ -1811,12 +1811,12 @@ def play_academic_words(bre_or_ame='ame', random_on=0, show_translation=1, show_
except: except:
pass pass
print(h2.get_text()) print(h2.get_text())
if show_link==1:
print('https://www.ldoceonline.com/dictionary/'+word)
try: try:
pygame.mixer.init() pygame.mixer.init()
track = pygame.mixer.music.load(directory+word+'.mp3') track = pygame.mixer.music.load(directory+word+'.mp3')
pygame.mixer.music.play() pygame.mixer.music.play()
if show_link==1:
print('https://www.ldoceonline.com/dictionary/'+word)
except: except:
pass pass
translation = re.findall('<p>.*?</p>', content, re.S)[0][3:-4] translation = re.findall('<p>.*?</p>', content, re.S)[0][3:-4]