Skip to content

Commit

Permalink
dev(narugo): remove force lang check, ci skip
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 committed Aug 28, 2024
1 parent 4197777 commit e625cb4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions zoo/games/azurlane/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ def _get_voices(link_name: str, session: Optional[requests.Session] = None):
if not voice_text:
logging.warning(f'Voice {voice_title!r} text of {link_name!r} is empty, skipped.')
continue
try:
if langdetect.detect(voice_text) != 'ja':
logging.warning(f'Voice text is not ja but {langdetect.detect(voice_text)!r} '
f'of {link_name!r}, skipped - {voice_text!r}.')
continue
except LangDetectException:
logging.warning(f'Voice text language is known '
f'of {link_name!r}, skipped - {voice_text!r}.')
continue
# try:
# if langdetect.detect(voice_text) != 'ja':
# logging.warning(f'Voice text is not ja but {langdetect.detect(voice_text)!r} '
# f'of {link_name!r}, skipped - {voice_text!r}.')
# continue
# except LangDetectException:
# logging.warning(f'Voice text language is known '
# f'of {link_name!r}, skipped - {voice_text!r}.')
# continue

if row('td:nth-child(2) a.sm2_button'):
file_url = urljoin(resp.url, row('td:nth-child(2) a.sm2_button').attr('href'))
Expand Down
18 changes: 9 additions & 9 deletions zoo/games/fgo/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ def _get_voices(self, name, session: Optional[requests.Session] = None):
if not re.sub(r'\([\s\S]*\)', '', voice_text):
logging.warning(f'No voice text found for {name!r}/{voice_title!r}, skipped.')
continue
try:
if langdetect.detect(voice_text) != 'ja':
logging.warning(f'Voice text is not ja but {langdetect.detect(voice_text)!r} '
f'of {name!r}, skipped - {voice_text!r}.')
continue
except LangDetectException:
logging.warning(f'Voice text language is known '
f'of {name!r}, skipped - {voice_text!r}.')
continue
# try:
# if langdetect.detect(voice_text) != 'ja':
# logging.warning(f'Voice text is not ja but {langdetect.detect(voice_text)!r} '
# f'of {name!r}, skipped - {voice_text!r}.')
# continue
# except LangDetectException:
# logging.warning(f'Voice text language is known '
# f'of {name!r}, skipped - {voice_text!r}.')
# continue

if not row('td:nth-child(3) a[download]'):
logging.warning(f'No voice downloadable url found for {name!r}/{voice_title!r}, skipped.')
Expand Down

0 comments on commit e625cb4

Please sign in to comment.