now it work
This commit is contained in:
parent
dda61eaef9
commit
deb77cd3d3
8
V4.py
8
V4.py
@ -38,13 +38,10 @@ def WaitUntilVisible(by, id, to = 20, browser = driver):
|
|||||||
|
|
||||||
def claim(auto = True, reward = "amazon"):
|
def claim(auto = True, reward = "amazon"):
|
||||||
dic_id = {"amazon" : "000803000031", "RP" : "000403000103", "fnac" : ""}
|
dic_id = {"amazon" : "000803000031", "RP" : "000403000103", "fnac" : ""}
|
||||||
dic_fun = {"amazon" : amazon, "RP": rp, 'fnac': fnac}
|
|
||||||
|
|
||||||
|
|
||||||
def number_verification():
|
def number_verification():
|
||||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'ÉCHANGER UNE RÉCOMPENSE')]").click()
|
|
||||||
sleep(5)
|
|
||||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'CONFIRMER LA RÉCOMPENSE')]").click()
|
|
||||||
countrycode = driver.find_element(By.ID, 'redeem-checkout-challenge-countrycode')
|
countrycode = driver.find_element(By.ID, 'redeem-checkout-challenge-countrycode')
|
||||||
phone = driver.find_element(By.ID, "redeem-checkout-challenge-fullnumber")
|
phone = driver.find_element(By.ID, "redeem-checkout-challenge-fullnumber")
|
||||||
sel = Select(countrycode)
|
sel = Select(countrycode)
|
||||||
@ -60,6 +57,7 @@ def claim(auto = True, reward = "amazon"):
|
|||||||
|
|
||||||
def start():
|
def start():
|
||||||
driver.get(f"https://rewards.bing.com/redeem/{dic_id[reward]}")
|
driver.get(f"https://rewards.bing.com/redeem/{dic_id[reward]}")
|
||||||
|
sleep(5)
|
||||||
try :
|
try :
|
||||||
driver.find_element(By.XPATH, "//span[contains( text( ), 'ÉCHANGER UNE RÉCOMPENSE')]").click()
|
driver.find_element(By.XPATH, "//span[contains( text( ), 'ÉCHANGER UNE RÉCOMPENSE')]").click()
|
||||||
except :
|
except :
|
||||||
@ -111,6 +109,8 @@ def claim(auto = True, reward = "amazon"):
|
|||||||
code = elm.get_attribute('innerHTML')
|
code = elm.get_attribute('innerHTML')
|
||||||
print(code)
|
print(code)
|
||||||
|
|
||||||
|
dic_fun = {"amazon" : amazon, "RP": rp, 'fnac': fnac}
|
||||||
|
|
||||||
try :
|
try :
|
||||||
start()
|
start()
|
||||||
if ("/rewards/redeem/orderhistory" in driver.page_source) :
|
if ("/rewards/redeem/orderhistory" in driver.page_source) :
|
||||||
|
Loading…
Reference in New Issue
Block a user