Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. from selenium import webdriver
  2. import requests
  3. import time
  4.  
  5. command_executor = 'http://127.0.0.1:4444/wd/hub'
  6.  
  7. connected = False
  8. while not connected:
  9. try:
  10. req = requests.get(command_executor)
  11. connected = (req.status_code == 200)
  12. print('connected')
  13. except Exception as e:
  14. print('waiting for connecting ' + str(e))
  15. time.sleep(5)
  16. options = webdriver.ChromeOptions()
  17. driver = webdriver.Remote(desired_capabilities=options.to_capabilities(), command_executor=command_executor)
  18.  
  19. times_submitted = 1717
  20. while times_submitted <= 2000:
  21. driver.get('https://docs.google.com/forms/d/e/1FAIpQLSdGYI60to2xMJp_vfLaYllHFwJsDoHtnWUiJfjFNhcOXcr_iw/viewform')
  22.  
  23. inputs = driver.find_elements_by_css_selector(".quantumWizTextinputPaperinputInput") + driver.find_elements_by_css_selector(".quantumWizTextinputPapertextareaInput")
  24.  
  25. inputs[0].send_keys('Kyle Roscoe ' + str(times_submitted))
  26. inputs[1].send_keys('19')
  27. inputs[2].send_keys('discord: StarSlapped#0001 insta: kyle.roscoe_')
  28. inputs[3].send_keys("1. Jacked varsity rower w/ 270 lb bench. 2. I'm 6ft 9in <- those are two separate measurements. 3. I already know where you live so it would be easy to move in together! :D I didn't submit all these applications for nothing >:}")
  29. inputs[4].send_keys("I like that you have a family friendly stream and nice white teeth. Also u have a nice cake. hehe")
  30.  
  31. driver.find_element_by_css_selector('.appsMaterialWizButtonPaperbuttonLabel').click()
  32. times_submitted += 1
  33. print("Count: " + str(times_submitted))
  34.  
  35. driver.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement