invisible labs should works... yes, again
This commit is contained in:
parent
22422e5d0b
commit
70cff5f756
1 changed files with 6 additions and 3 deletions
|
@ -90,11 +90,14 @@ def find_infect_theme(text):
|
||||||
trying_theme_index = bio_attack_themes.index(theme)
|
trying_theme_index = bio_attack_themes.index(theme)
|
||||||
logger.debug(f'trying theme {trying_theme_index}...')
|
logger.debug(f'trying theme {trying_theme_index}...')
|
||||||
r, bioexp, days, remaining = re.findall(theme[0], text), re.findall(theme[1], text), re.findall(theme[2], text), re.findall(theme[3], text)
|
r, bioexp, days, remaining = re.findall(theme[0], text), re.findall(theme[1], text), re.findall(theme[2], text), re.findall(theme[3], text)
|
||||||
if len(r) > 2 and bioexp and days and remaining:
|
if r and bioexp and days and remaining:
|
||||||
logger.debug(f'found theme {trying_theme_index}')
|
logger.debug(f'found theme {trying_theme_index}')
|
||||||
return r, bio_attack_themes[trying_theme_index]
|
return r, bio_attack_themes[trying_theme_index]
|
||||||
r = re.findall(theme[0].split('</a>', 1)[1], text)
|
for theme in bio_attack_themes:
|
||||||
if len(r) == 1 and bioexp and days and remaining:
|
trying_theme_index = bio_attack_themes.index(theme)
|
||||||
|
logger.debug(f'trying theme {trying_theme_index} [without first lab]...')
|
||||||
|
r, bioexp, days, remaining = re.findall(theme[0].split('</a>', 1)[1], text), re.findall(theme[1], text), re.findall(theme[2], text), re.findall(theme[3], text)
|
||||||
|
if r and bioexp and days and remaining:
|
||||||
logger.debug(f'found theme {trying_theme_index}, but invisible first lab it will be replaced to avocado id')
|
logger.debug(f'found theme {trying_theme_index}, but invisible first lab it will be replaced to avocado id')
|
||||||
r = [(f'tg://openmessage?user_id={avocado_id}', r[0])]
|
r = [(f'tg://openmessage?user_id={avocado_id}', r[0])]
|
||||||
return r, bio_attack_themes[trying_theme_index]
|
return r, bio_attack_themes[trying_theme_index]
|
||||||
|
|
Loading…
Reference in a new issue