|
from selenium import webdriver
|
|
from selenium.webdriver.support.ui import WebDriverWait
|
|
from selenium.webdriver.support import expected_conditions as EC
|
|
from selenium.webdriver.common.by import By
|
|
from selenium.webdriver.common.keys import Keys
|
|
import time
|
|
|
|
driver = webdriver.Firefox()
|
|
driver.maximize_window()
|
|
|
|
try:
|
|
|
|
driver.get("https://rentmasseur.com/")
|
|
driver.set_window_size(1309, 753)
|
|
|
|
|
|
try:
|
|
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".cookie-banner .accept-button"))).click()
|
|
except:
|
|
pass
|
|
|
|
try:
|
|
|
|
WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((By.CSS_SELECTOR, ".modal-overlay")))
|
|
except:
|
|
pass
|
|
|
|
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".navbar-column > .jsx-2001960601:nth-child(1) > .navigation-link-text"))).click()
|
|
|
|
|
|
email_field = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "email")))
|
|
email_field.click()
|
|
email_field.send_keys("Karpathianwolf")
|
|
email_field.send_keys(Keys.ENTER)
|
|
|
|
|
|
password_field = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "password")))
|
|
password_field.click()
|
|
password_field.send_keys("Lola369!")
|
|
|
|
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".switch"))).click()
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".jsx-1345806167 > .button"))).click()
|
|
|
|
|
|
try:
|
|
|
|
WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((By.CSS_SELECTOR, ".overlay")))
|
|
except:
|
|
pass
|
|
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".status-icon-green"))).click()
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".navigation-link > .icon-available")))
|
|
|
|
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".has-width-50per:nth-child(2) > .jsx-2753549060 > .jsx-2753549060"))).click()
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".jsx-2753549060:nth-child(6)"))).click()
|
|
|
|
|
|
driver.execute_script("window.scrollTo(0,110)")
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "My Interview"))).click()
|
|
driver.execute_script("window.scrollTo(0,0)")
|
|
|
|
|
|
incall = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "incallPrice")))
|
|
incall.click()
|
|
incall.send_keys("230")
|
|
|
|
outcall = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "outcallPrice")))
|
|
outcall.click()
|
|
outcall.send_keys("269")
|
|
|
|
|
|
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".is-justify-content-flex-end > .jsx-1644775375"))).click()
|
|
|
|
finally:
|
|
time.sleep(5)
|
|
driver.quit()
|
|
|
|
|