-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[nodriver] headless=True gets detected #1848
Comments
Some websites have stronger detection algorithms so when running headless you are more likely to get detected. As a workaround, you can use a virtual display and run non-headless to get similar functionality but at a cost of more computational power. |
I got the same issue since the last month, as headless mode gets detected so I worked around it using a virtual display.
Having said that, if you are using a linux vps you will need xvfb package. |
@Wajih-Wanis can you elaborate more on this method? I'd like to implement it in my code but I don't quite get how I can continue after display.start(), is it supposed to replace nodriver.start()? |
Same issue for me. @Wajih-Wanis How the virtual display worked in code? Could you please provide a example? |
use --headless=chrome |
from pyvirtualdisplay import Display |
This code snippet should wrap your whole automation process. Write your code as if it going to run in normal mode ( not headless ) and add those at the start of the code. It will run in non headless but it will not have any visible display. |
First of all thank you for the great package.
It works fine, if headless = False but when switch to headless=True, it gets detected.
Any guidance to address this?
Tested @ s a h i b i n d e n dot c o m
The text was updated successfully, but these errors were encountered: