I'm not skilled enough to understand all that code but try Selenium. It's really good for interacting with websites
Don't use the IDE because the commands on there are limited so you would want to import it into python. I'm pretty sure pip can be used to install it
Don't use the IDE because the commands on there are limited so you would want to import it into python. I'm pretty sure pip can be used to install it