optimize sound, and remove unused codes
This commit is contained in:
@@ -22,6 +22,7 @@ number_text_dict = {'eight': 8,
|
|||||||
'four': 4,
|
'four': 4,
|
||||||
'for': 4,
|
'for': 4,
|
||||||
'five': 5,
|
'five': 5,
|
||||||
|
'by': 5,
|
||||||
'six': 6,
|
'six': 6,
|
||||||
'seven': 7, 'i': 9, 'nine': 9}
|
'seven': 7, 'i': 9, 'nine': 9}
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ class GeoCaptchaSolver:
|
|||||||
print(number_to_type)
|
print(number_to_type)
|
||||||
if len(number_to_type) == 6:
|
if len(number_to_type) == 6:
|
||||||
self.input_numbers(number_to_type)
|
self.input_numbers(number_to_type)
|
||||||
print("App thinks you said " + text)
|
self.logger.info("App thinks you said " + text)
|
||||||
return False
|
return False
|
||||||
except sr.UnknownValueError:
|
except sr.UnknownValueError:
|
||||||
print("App could not understand audio")
|
print("App could not understand audio")
|
||||||
@@ -109,4 +110,10 @@ class GeoCaptchaSolver:
|
|||||||
|
|
||||||
self.iframe.query_selector(".audio-captcha-verify-button").evaluate("""(btn)=>{
|
self.iframe.query_selector(".audio-captcha-verify-button").evaluate("""(btn)=>{
|
||||||
btn.click()};""")
|
btn.click()};""")
|
||||||
|
self.iframe.query_selector(".audio-captcha-verify-button").evaluate("""(btn)=>{
|
||||||
|
btn.click()};""")
|
||||||
|
# time.sleep(3)
|
||||||
|
|
||||||
self.delete_audio_file()
|
self.delete_audio_file()
|
||||||
|
# self.iframe.query_selector(".audio-captcha-verify-button").evaluate("""(btn)=>{
|
||||||
|
# btn.click()};""")
|
||||||
|
|||||||
@@ -2,14 +2,13 @@ import datetime
|
|||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import requests
|
|
||||||
import sys
|
import sys
|
||||||
import threading
|
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
from src import params, definitions
|
from src import params, definitions
|
||||||
from src.db.mongo_manager import MONGO_STORE_MANAGER
|
from src.db.mongo_manager import MONGO_STORE_MANAGER
|
||||||
from src.params import get_random_wait_time
|
from src.params import get_random_wait_time
|
||||||
@@ -443,13 +442,6 @@ def launch_page():
|
|||||||
return page.start_page(params.get_proxy(ProxyType.RESIDENTIAL), use_proxy=False)
|
return page.start_page(params.get_proxy(ProxyType.RESIDENTIAL), use_proxy=False)
|
||||||
|
|
||||||
|
|
||||||
def wait_for_otp(event: threading.Event, commandor: CommandorPage):
|
|
||||||
sec = input("Press Enter otp to continue...\n")
|
|
||||||
print("input otp is: " + sec)
|
|
||||||
commandor.otp_value = sec
|
|
||||||
event.set()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
launch_page()
|
launch_page()
|
||||||
# time = get_random_wait_time()
|
# time = get_random_wait_time()
|
||||||
|
|||||||
Reference in New Issue
Block a user