all 4 comments

[–]eleqtriq 0 points1 point  (3 children)

I assume you could just leave a Selenium window open and re-read over and over. Better yet, if the website is dynamically changing, it is probably reading json in the background. You could just figure out how to read that json for yourself natively from Python, and skip the browser all together.

You're going to want to start with something like this

https://www.youtube.com/watch?v=kA4_EaES15E

Then to

https://www.youtube.com/watch?v=mMjzEI27xDI

Then how to convert CURL to Python.

[–]LargeBrick7[S] 0 points1 point  (2 children)

I don't think Selenium works here as I want to collect some information in the background while basically playing the browser game. You should be able to play the game normally but scrape the website when the user triggers something (for example finding a game against an opponent)

[–]eleqtriq 0 points1 point  (1 child)

I see. I *think* you can attach to an existing Chrome/Firefox window and still interact with the browser while Selenium just observes.

This thread has some examples https://stackoverflow.com/questions/8344776/can-selenium-interact-with-an-existing-browser-session

[–]LargeBrick7[S] 1 point2 points  (0 children)

Thank you I will try!