need to test on mac os
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import random
|
||||
# for recaptcha
|
||||
import urllib
|
||||
import pydub
|
||||
from speech_recognition import Recognizer, AudioFile
|
||||
import random
|
||||
import os
|
||||
|
||||
@@ -349,15 +349,16 @@ class CommandorPage:
|
||||
while solution == CAPCHA_NOT_READY:
|
||||
solution_res = requests.get(url_response)
|
||||
print(solution_res.text)
|
||||
time.sleep(5)
|
||||
solution = solution_res.text
|
||||
print(solution)
|
||||
self.fill_captcha_solution(solution.split("|")[-1])
|
||||
|
||||
def fill_captcha_solution(self, solution):
|
||||
self.logger.info("wil input solution: " + solution)
|
||||
self.logger.info("will input solution: " + solution)
|
||||
self.page.evaluate("""(solution)=>{
|
||||
let captcha_response = document.getElementById("g-recaptcha-response");
|
||||
captcha_response.innerHTML=solution;}}""", solution)
|
||||
document.getElementById("g-recaptcha-response").innerHTML=solution;}""", solution)
|
||||
self.logger.info("will click on valid btn")
|
||||
self.clickOnValidBtn()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user