Created
July 28, 2021 23:17
-
-
Save Ze1598/526c753d7db8a588ca4b54391c0b52a7 to your computer and use it in GitHub Desktop.
Arknights - scrape operator level up stats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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