Last active
April 22, 2021 22:59
-
-
Save thepycoach/25a03ef82c2b7e5d5e0f7d95294cb877 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Make ChromeDriver click a button | |
| #option 1 | |
| accept = WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="_evidon-accept-button"]'))) | |
| #option 2 | |
| # time.sleep(2) | |
| # accept = driver.find_element_by_xpath('//*[@id="_evidon-accept-button"]') | |
| #Initialize your storage | |
| teams = [] | |
| x12 = [] | |
| btts = [] | |
| over_under = [] | |
| odds_events = [] | |
| #select values from dropdown (update 1) | |
| dropdowns = WebDriverWait(driver, 5).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'SportHeader-styles-drop-down'))) | |
| first_dropdown = Select(dropdowns[0]) | |
| second_dropdown = Select(dropdowns[1]) | |
| third_dropdown = Select(dropdowns[2]) | |
| first_dropdown.select_by_visible_text('Both Teams to Score') #update 'Both teams to score?' -> 'Both Teams to Score' | |
| second_dropdown.select_by_visible_text('Over/Under') | |
| third_dropdown.select_by_visible_text('3-Way') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment