🐛 Fixed 2FA prompt

& fixed when the script knows it scraped all 1000 availible docs
This commit is contained in:
2021-04-08 01:39:48 +03:00
parent 44ba8c97a1
commit b36927c6a8
2 changed files with 5 additions and 3 deletions

View File

@@ -78,8 +78,9 @@ while True:
if interest in text:
photos_saved += 1
save_photo(image_url)
#sleep(1)
query['completed'] = True
sleep(1)
except KeyboardInterrupt:
c.print(' Goodbye!', style='blue')

View File

@@ -1,6 +1,7 @@
import vk_api
import configparser
from rich.console import Console
from rich.prompt import Prompt
c = Console()
config = configparser.ConfigParser()
@@ -9,7 +10,7 @@ login = config['CREDENTIALS']['login']
password = config['CREDENTIALS']['password']
def _2fa_handler():
code = c.input("Enter 2FA code: ", style="italic cyan")
code = Prompt.ask("Enter 2FA code")
return code, True
def authenticate():