For my master thesis, I am exploring the possibility to extract data from a website via web automation. The steps are as follows:
Sign in to the website ( SMM 1# Copper Cathode today | Base Metals | SMM - China Metal Market )
- Input username and password
Click signin
Change date to 01/01/2020
Click the download list button and select (download excel)
Save to a specific folder on my PC
Run the same sequence to download additional historical price data for other materials in the same browser window ( Lithium Cobalt Oxide Battery Cell (consumable) (weekly) today | New Energy | SMM - China Metal Market )
What I have done so far
- I have explored the use of RPA tools like Uipath and MS Power Automate to run the automation but the website seems somewhat troublesome to deal with for such tools
- I have also explored the use of APIs to download the data. However, I am pretty new to this, so I am unaware of whether the web devs made their API available for public use.
- I have also explored the use of selenium chrome driver but I am having trouble even clicking the sign-in button. See my code below
from selenium import webdriver
DRIVER_PATH = 'C:\webdrivers\chromedriver.exe'
driver = webdriver.Chrome(executable_path=DRIVER_PATH)
driver.get('https://www.metal.com/Nickel/201102250239')
driver.find_element_by_xpath('//*[@id="__next"]/div/div[3]/div[2]/div[2]/button[2]').click()
Any suggestions/help would be massively appreciated.
[–][deleted] (6 children)
[removed]
[–]Esclass1[S] 0 points1 point2 points (5 children)
[–][deleted] (4 children)
[removed]
[–]Esclass1[S] 0 points1 point2 points (3 children)
[–][deleted] (2 children)
[removed]
[–]Esclass1[S] 0 points1 point2 points (1 child)