Skip to content

Instantly share code, notes, and snippets.

@Ze1598
Last active July 28, 2021 18:36
Show Gist options
  • Save Ze1598/1e28ac011b850d35fd8a13d1a902c575 to your computer and use it in GitHub Desktop.
Save Ze1598/1e28ac011b850d35fd8a13d1a902c575 to your computer and use it in GitHub Desktop.
Arknights - scrape operator level up stats
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
# Dynamically install a Chrome web driver and instantiate it
driver = webdriver.Chrome(ChromeDriverManager().install())
# Make the driver wait 7 seconds for the page to load
driver.implicitly_wait(7)
# Go the Phantom's character page
driver.get("https://gamepress.gg/arknights/operator/phantom")
# Element to scroll to
scroll_to_element = driver.find_element_by_class_name("popular-items-block")
# Scroll to it
actions.move_to_element(scroll_to_element).perform()
# Locate the close ad button
sticky_ad_close_btn = driver.find_element_by_id("closeIcon")
# And click it (close it)
sticky_ad_close_btn.click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment