Open FirePH7 opened 2 years ago
Hi, @FirePH7 Glad to hear this helped you understand the usage of Selenium! I remember I also had an issue with running headless last time I played with this. I'm not exactly sure why it does not work. I struggled with it for a couple of days before running out of time to work on it. I decided to leave the headless functionality in the code for people to see how to use it with other Selenium projects. If you happen to figure it out, feel free to submit a pull request. Apologies for not being able to assist further.
Hi, @ruankie the only thing i could find out is that there is a timeout at login. Also the increase to 120s was not successful. Let's see if I can find something out. If I find out anything, I would report back. Thanks for the support. By the way, happy new year.
Great, thanks a lot @FirePH7! And a happy new year to you too! 🎉
Hi ruankie,
I found the reason why your program does not work in headless mode.
I first found out that if I just go to the website and call the title of the window (GuruShots | The World's Greatest Photo Game), nothing is returned.
After a short search on the internet I came to the following link with the solution: https://stackoverflow.com/questions/69128870/why-cant-get-the-page-source-with-headless-browser-using-selenium#comment122189561_69128870
Hi @FirePH7, Thanks for sharing. It seems like quite a simple solution: change the User-Agent option. I'm not that active on GuruShots these days but I'll have a look at it incorporating the solution at some point if I try out another photo competition. Hope the change works for you. Happy auto-filling :)
@ruankie Really good work :) These example helps me to understand the usage of selenium. Unfortunately I can't get the headless mode to work and I don't get a meaningful message. Can it be that this mode is not possible with Gurushots?