Skip to content

Instantly share code, notes, and snippets.

@Ze1598
Created July 28, 2021 23:17
Show Gist options
  • Save Ze1598/526c753d7db8a588ca4b54391c0b52a7 to your computer and use it in GitHub Desktop.
Save Ze1598/526c753d7db8a588ca4b54391c0b52a7 to your computer and use it in GitHub Desktop.
Arknights - scrape operator level up stats
# Imports
# (...)
# selenium set up
# (...)
# scrape dictionary of characters and output as pickle
# (...)
# op_dict is the dictionary with all characters and their URLs
# Get data for each available operator
for operator in op_dict:
target_url = op_dict[operator]
# Open the target URL
driver.get(target_url)
# Create an ActionChains object used to scroll in the page
# This object should be recreated for each new page we navigate to
actions = ActionChains(driver)
# Same code to scrape that we saw before
# The refactor required was to put this code inside the for loop to get the target url from the dictionary
# (...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment