Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless mode couldn't use #1

Open
FirePH7 opened this issue Jan 2, 2022 · 5 comments
Open

Headless mode couldn't use #1

FirePH7 opened this issue Jan 2, 2022 · 5 comments

Comments

@FirePH7
Copy link

FirePH7 commented Jan 2, 2022

@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?

@ruankie
Copy link
Owner

ruankie commented Jan 3, 2022

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.

@FirePH7
Copy link
Author

FirePH7 commented Jan 5, 2022

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.

@ruankie
Copy link
Owner

ruankie commented Jan 5, 2022

Great, thanks a lot @FirePH7!
And a happy new year to you too! 🎉

@FirePH7
Copy link
Author

FirePH7 commented Apr 10, 2022

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

@ruankie
Copy link
Owner

ruankie commented Apr 13, 2022

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants