-
-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Labels
enhancementNew feature or requestNew feature or requestfuture planningIdeas or features proposed for future development.Ideas or features proposed for future development.
Description
Currently, if a user wants to save a page for offline use, they need to manually fetch HTML, download assets, and rewrite links. This is verbose and error-prone.
We should introduce a method tab.save_bundle() that captures the current page and all of its assets (HTML, CSS, JS, images, fonts) into a single bundle for offline viewing. The output is a bundle.zip containing an index.html with all URLs rewritten to point to local paths.
Proposed API
await tab.save_bundle(path="bundle.zip", inline_assets: bool = False)- If
inline_assets=True, resources are embedded directly (Base64 or <style>/<script> tags). - If
inline_assets=False, assets are stored as separate files inside the bundle, and src/href are rewritten accordingly.
This gives users a “save as web archive” equivalent directly in Pydoll, useful for archiving, dataset creation, or debugging websites offline.
LucasAlvws
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfuture planningIdeas or features proposed for future development.Ideas or features proposed for future development.