From ff579a623de2b0b46baf9cd766bdbadbd1c24fdf Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Fri, 25 Feb 2022 00:19:58 +0800 Subject: [PATCH] 0.0.73 --- PyPI/setup.cfg | 2 +- PyPI/src/guan/__init__.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index 31ae5fa..51e5619 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.0.72 +version = 0.0.73 author = guanjihuan author_email = guanjihuan@163.com description = An open source python package diff --git a/PyPI/src/guan/__init__.py b/PyPI/src/guan/__init__.py index 98db62b..9c87f76 100644 --- a/PyPI/src/guan/__init__.py +++ b/PyPI/src/guan/__init__.py @@ -1791,7 +1791,7 @@ def play_academic_words(bre_or_ame='ame', random_on=0, show_translation=1, show_ if exist_directory == 0: os.makedirs(directory) soup = BeautifulSoup(html, features='lxml') - contents = re.findall('

.*?

', html, re.S) + contents = re.findall('

.*?

', html, re.S) if random_on==1: random.shuffle(contents) for content in contents: @@ -1817,12 +1817,12 @@ def play_academic_words(bre_or_ame='ame', random_on=0, show_translation=1, show_ pygame.mixer.init() track = pygame.mixer.music.load(directory+word+'.mp3') pygame.mixer.music.play() - translation = re.findall('

.*?

', content, re.S)[0][3:-4] - if show_translation==1: - time.sleep(translation_time) - print(translation) - time.sleep(rest_time) - pygame.mixer.music.stop() except: pass + translation = re.findall('

.*?

', content, re.S)[0][3:-4] + if show_translation==1: + time.sleep(translation_time) + print(translation) + time.sleep(rest_time) + pygame.mixer.music.stop() print() \ No newline at end of file