Skip to content

Send page DOM + screenshot directly to archivebox when saving #33

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

Open
pirate opened this issue Dec 4, 2024 · 4 comments
Open

Send page DOM + screenshot directly to archivebox when saving #33

pirate opened this issue Dec 4, 2024 · 4 comments

Comments

@pirate
Copy link
Member

pirate commented Dec 4, 2024

When submitting a page to ArchiveBox, the extension should send the page DOM + MHTML + innerText + screenshot as well.

That way there is always a capture of the page exacly as it appears when browsing.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/captureVisibleTab

@TomK32
Copy link

TomK32 commented Jan 16, 2025

I'm not one of the devs but it look possible to either extend the API here a bit
https://github.com/ArchiveBox/ArchiveBox/blob/dev/archivebox/core/views.py#L433

or uncomment and extend the @router.post("/snapshot"...) here https://github.com/ArchiveBox/ArchiveBox/blob/aa55e0d02e644e011e8a09b41c6c6c316c164d3c/archivebox/api/v1_core.py#L317

@TomK32
Copy link

TomK32 commented Feb 7, 2025

I just wondered if this feature could go one step further. I often find the singlepage to be unusable because modern website are simply broken with all this advertising and javascript.
A quick snoop through the DOM inspector to delete those works wonders every time but those changes aren't permanent.
And update function could figure the snapshot id from the url and get the content of the modified page is as looping over the document.children and getting their outerHTML.

@TomK32
Copy link

TomK32 commented Feb 7, 2025

Having tried the singlefile addon, archivebox uses the cli version, it does use the modified document, so if archivebox would allow sending the singlefile along, it might make sense to instead add an archivebox feature to the singlefile addon instead (or additionally).

@pirate
Copy link
Member Author

pirate commented Mar 9, 2025

I built a proof of concept of this that sends the current DOM + screenshot directly to an S3 compatible store (no server needed), it works great! https://github.com/ArchiveBox/screenshot-to-s3-extension

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

No branches or pull requests

2 participants