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

Make screenshot after custom behaviors #486

Open
cmillet2127 opened this issue Mar 7, 2024 · 5 comments
Open

Make screenshot after custom behaviors #486

cmillet2127 opened this issue Mar 7, 2024 · 5 comments

Comments

@cmillet2127
Copy link

Currently it seems screenshot are made before custom behaviors.

It could be very interesting to be able a post-custom behaviors screenshot. For example to capture screenshot after removing the "accept cookies" modals.

@ikreymer
Copy link
Member

ikreymer commented Mar 8, 2024

We are using Brave, and the accept cookies modals are actually removed by the browser before our custom behaviors are run, so the screenshot should actually reflect that, I believe. But, your point stands that it could be interesting to take a screenshot after autoscroll, etc..

@cmillet2127
Copy link
Author

In my situation, I'm encountering an unusual behavior while running Docker on Windows with the most recent image release. When utilizing the browsertrix-crawler, the 'accept cookies' modal persists. However, when navigating manually with Brave browser, the modal does not appear. Initially, I suspected that my image was still employing Chrome, but your confirmation of its use of Brave has led me to reconsider.

Example:
docker run -v c:\tmp\crawls:/crawls/ -it webrecorder/browsertrix-crawler crawl --url https://www.abarth.fr --generateWACZ final-to-warc --text --wait-until domcontentloaded --screenshot thumbnail,view,fullPage --scopeType page --blockAds

@cmillet2127
Copy link
Author

We are using Brave, and the accept cookies modals are actually removed by the browser before our custom behaviors are run, so the screenshot should actually reflect that, I believe. But, your point stands that it could be interesting to take a screenshot after autoscroll, etc..

Indeed, an additional suggestion might involve capturing a screenshot through a custom behavior using a 'utils' method. This approach would allow us to incorporate it into the WARC file, aligning with the methodology used for other screenshots.

@ikreymer
Copy link
Member

ikreymer commented Mar 8, 2024

If you run webrecorder/browsertrix-crawler it will use webrecorder/browsertrix-crawler:latest, which currently still points to the non-Brave version, unless you check out the repo and build it locally. You can try the latest beta release with webrecorder/browsertrix-crawler:1.0.0-beta.7.
We hope to release the 1.0.0 version soon and then it will be latest.

@fservida
Copy link

@ikreymer is this still of interest? it would be extremely useful for us as some websites load images dynamically during scrolling, and therefore are missing if doing a fullpage screenshot before custom behaviours.
I am quite lost in the code as unfamiliar with js, if pointed to right place of screenshot logic I can try something out and provide a PR

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

No branches or pull requests

3 participants