This commit is contained in:
piair 2022-04-11 12:36:03 +02:00
parent 27b2262353
commit c3367084e1

4
V4.py
View File

@ -201,6 +201,7 @@ def PlayQuiz2(override= None):
override = 10 override = 10
for j in range (override): for j in range (override):
try : try :
RGPD()
CustomSleep(uniform(3,5)) CustomSleep(uniform(3,5))
txt = driver.page_source txt = driver.page_source
secret = search('IG:\"([^\"]+)\"', txt)[1] #variable dans la page, pour calculer le offset secret = search('IG:\"([^\"]+)\"', txt)[1] #variable dans la page, pour calculer le offset
@ -236,6 +237,7 @@ def PlayQuiz8(override = 3):
try : try :
c = 0 c = 0
for i in range(override): for i in range(override):
RGPD()
sleep(uniform(3,5)) sleep(uniform(3,5))
ListeOfGood =[] ListeOfGood =[]
for i in range(1,9): for i in range(1,9):
@ -284,7 +286,7 @@ def PlayQuiz4(override = None):
for i in range(override): for i in range(override):
CustomSleep(uniform(3,5)) CustomSleep(uniform(3,5))
txt = driver.page_source txt = driver.page_source
RGPD()
reponse = search("correctAnswer\":\"([^\"]+)", txt)[1] #je suis pas sur qu'il y ait un espace reponse = search("correctAnswer\":\"([^\"]+)", txt)[1] #je suis pas sur qu'il y ait un espace
reponse = reponse.replace('\\u0027',"'") #il faut cancel l'unicode avec un double \ (on replacer les caracteres en unicode en caracteres utf-8) reponse = reponse.replace('\\u0027',"'") #il faut cancel l'unicode avec un double \ (on replacer les caracteres en unicode en caracteres utf-8)
printf(f"validation de la reponse " , end="\r") printf(f"validation de la reponse " , end="\r")