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