Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. from selenium import webdriver
  2. import time
  3. import subprocess
  4.  
  5. while True:
  6. driver = webdriver.Chrome()
  7. driver.get("https://www.gamestop.com/video-games/switch/consoles/products/nintendo-switch-animal-crossing-new-horizons-edition/11100143.html")
  8. time.sleep(5)
  9. result = driver.find_element_by_class_name("add-to-cart").get_property('disabled')
  10. if result is not True:
  11. while True:
  12. subprocess.run('afplay /System/Library/Sounds/Glass.aiff', shell=True)
  13. driver.get("https://www.target.com/p/animal-crossing-new-horizons-8211-nintendo-switch-journal-bundle/-/A-76780148")
  14. time.sleep(5)
  15. if 'Preorders have sold out' not in driver.page_source:
  16. while True:
  17. subprocess.run('afplay /System/Library/Sounds/Glass.aiff', shell=True)
  18. driver.close()
  19. time.sleep(60)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement