Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver.common.by import By
- from selenium.webdriver.chrome.options import Options
- import time
- # Setup Chrome options for incognito mode
- chrome_options = Options()
- chrome_options.add_argument("--incognito")
- chrome_options.add_argument("--headless")
- # Function to perform the actions
- def perform_actions():
- # Setup the WebDriver with incognito mode
- driver = webdriver.Chrome('/usr/local/bin/chromedriver', options=chrome_options)
- driver.get('https://poll.fm/13231960')
- try:
- # Find the player you want to vote for ;)
- radio_button = driver.find_element(By.ID, 'PDI_answer59291850')
- radio_button.click()
- # Click on vote
- href_button = driver.find_element(By.ID, 'pd-vote-button13231960')
- href_button.click()
- # Wait for however many seconds you want. I chose 5.
- time.sleep(5)
- # Go back to the poll
- driver.get('https://poll.fm/13231960')
- except Exception as e:
- print("An error occurred:", e)
- finally:
- # Close the browser window
- driver.quit()
- # Repeat the process
- while True:
- perform_actions()
Add Comment
Please, Sign In to add comment