Closed andynuss closed 5 months ago
do I want to be importing from '@ulixee/hero'?
Yes, for the client library
am I to be using Hero Core as a means of controlling the injected javascript?
You want to use the execute-js plugin. I believe it's the same thing as you have here and used in SecretAgent
will I still be able to do check which font resources were actually loaded by the page?
Sure. Same as SecretAgent.
when I create a new instance of Hero, if I give any viewport preferences, can I do so without defeating Hero's browser emulation?
This doesn't matter for emulation
this is to have some reasonable control over the size of the screen capture
Makes sense. You could also probably shrink the image that comes back using some kind of image lib
can I let Hero control emulated scrolling before as part of the hero.waitForXXX() call? or would it be after?
You probably want to wait for some stability, but I often just wait for a particular element to be on the page.
Hi,
Previously I worked with secret-agent, and worked out how to port a puppeteer scraping script of my own, whose focus is on capturing needs that require a single injection of my own large script for the main page and a few iframes if needed. In other words, I was using secret-agent as a sort of replacement for Playwright, and perhaps still wish to do the same with Hero, but still gain the advantage of avoiding being easily fingerprinted.
That is, both on my testing machine, and on my own ec2 instance, I wish to to setup my own simply nodejs http server process, which responds to my restful scraping requests to launch a Hero instance to scrape using the Chrome installed on that machine.
I wish to port to Hero and probably have to relearn some basic concepts:
Andy
BTW: here is my first sketch: