GithubHelp home page GithubHelp logo

Comments (3)

cderv avatar cderv commented on June 3, 2024 1

You could try without the space after user-agent= maybe ?

from pagedown.

cderv avatar cderv commented on June 3, 2024

Is this a pagedown question on how to pass argument in extra_args ? Or did you try something and it is not working ?

If this is a question on which user agent to set to bypass the restriction on the website you want to reach, I'll bet you'll find answer on the web.

Also if a website has some policy and put in place restriction, you should carefully read the rules of the website to still be authorize to do what you want to do. Usually security measure like prevent headless access are there for a reason.

Anyhow, happy to help with any pagedown bug, for the rest we are not expert in headless chrome usage. pagedown::chrome_print() is made in the first place to print to PDF document produced by pagedown and is not a special chrome headless tool. Know that you have R packages dedicated to this like chromote and webshot2 which use it.

Hope it helps

from pagedown.

dendrit1 avatar dendrit1 commented on June 3, 2024

@cderv
Yes, I tried something, and it is not working, i.e., I added:
extra_args = c('--disable-gpu', '--user-agent ="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"')

The browser is still recognized as headless on this test-page. Do I have to escape something, or is perhaps the syntax wrong?

Anyway, I solved the problem meanwhile using chromote.
But still, I would like to know if and how this could be also done using pagedown::chrome_print() ?

Thanks a lot !

from pagedown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.