direct scripting like phantomJS -- 202012115

28 views
Skip to first unread message

c...@free.fr

unread,
Dec 10, 2020, 5:09:29 PM12/10/20
to headle...@chromium.org
Hi,
I see for '--headless' Chrom(e|ium) usage what is presented in
https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md or
https://developers.google.com/web/updates/2017/04/headless-chrome

that there is only little support for shell access to the browser's features :
--dump-dom
--print-to-pdf
--screenshot
--repl
I suspect the last one could provide the same possibilities as the console available
via the 'devtools' of the whole browser. Am I right?
If so, any way to load a script from the command line to make the browser load a page,
mangle its content, click here and there, extract partial content to the console?
(so one could use it as integrated tool to the shell : using pipes/redirections to/from other tools)

the above might not make it clear : without relying on additinal layers (nodejs+puppeteer+blabla+xyz...).
since Chrom(e|ium) already comes with its (and "Nx10MB" in size) JS & renderer engines+tools
so adding redundant resource hungry apps is uncalled, eg. in the context of light embedded apps.

Maybe this is already describe somewhere (which i could not find), in that case i'd be
glad to read about.

Thank you all for your kind attention and any help you could provide

JClu
202012115

Alex Clarke

unread,
Dec 16, 2020, 5:58:27 AM12/16/20
to c...@free.fr, headless-dev
You can open a websocket to a headless browser and send it devtools protocol commands.  This is what puppeteer does, maybe take a look at https://github.com/puppeteer/puppeteer/blob/main/src/common/BrowserConnector.ts for inspiration.

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/200443839.43429124.1607638167179.JavaMail.root%40zimbra33-e6.priv.proxad.net.

Jerry Lee Daniel

unread,
Nov 19, 2023, 5:01:42 PM11/19/23
to headless-dev, alexc...@google.com, headless-dev, c...@free.fr
Loans, Project and Digital Investment financing available up to $500m.
Have a Business Plan, Fundable Project and Redeemable Collateral.

Whatsapp: +44 7405 896213

Jerry Lee Daniel

unread,
Nov 19, 2023, 5:02:52 PM11/19/23
to headless-dev, alexc...@google.com, headless-dev, c...@free.fr
Reply all
Reply to author
Forward
0 new messages