Skip to main content

Module for reading Apple's webarchive format

Project description

pywebarchive is software for reading Apple's webarchive format. It consists of two pieces:

  • Webarchive Extractor converts webarchive files to standard pages you can open in any browser.
  • The webarchive Python module is the code "under the hood" that makes the Extractor work. It's available for other applications to use, too.

pywebarchive is open-source software released under the permissive MIT License. Development takes place on GitHub. As of October 2022, I am no longer adding new features, but I will still accept issues and pull requests to fix what's already there.

Features

  • Runs on Windows, macOS, and Linux
  • Converts webarchive files to plain HTML
  • Handles images, scripts, and style sheets
  • Converted pages display just like they would in Safari (apart from normal cross-browser rendering differences)

Downloads

The latest version is pywebarchive 0.5.1 (released October 8, 2022). See the changelog for what's new.

Note: If you're not reading this on GitHub, this section may be out of date. In that case, the latest version of pywebarchive is available at https://github.com/bmjcode/pywebarchive.

File Size Description
Webarchive.Extractor.exe 7.3 MB Webarchive Extractor for 32-bit Windows
Webarchive.Extractor.x64.exe 8.0 MB Webarchive Extractor for 64-bit Windows
pywebarchive-0.5.1.zip source code (zip)
pywebarchive-0.5.1.tar.gz source code (tar.gz)

The Windows version of Webarchive Extractor runs on Windows 7 and higher. It is a portable application -- it doesn't require installation, and won't write to Application Data or the Windows Registry.

On macOS and Linux (and Windows with Python installed), you can run Webarchive Extractor directly from the source code. Both command-line (extractor.py) and graphical (extractor-gui.py) versions are included.

If you're a Python developer, you can also install the webarchive module from PyPI using pip install pywebarchive. Note the module you import is just webarchive, but the package you install is pywebarchive; this is because an unrelated project already claimed the shorter package name.

Requirements

More information

Webarchive is the default format for the "Save As" command in Apple's Safari browser. (Other Apple software also uses it internally for various purposes.) Its main advantage is that it can save all the content on a webpage -- including external media like images, scripts, and style sheets -- in a single file. However, the webarchive format is proprietary and not publicly documented, and most other browsers cannot open webarchive files. pywebarchive solves this by converting webarchive files to standard HTML pages, which can be opened in any browser or editor.

The name "pywebarchive" simply reflects that this is webarchive-handling software written in the Python programming language.

pywebarchive follows the Unix philosophy of "do one thing and do it well". With that in mind, pywebarchive deliberately omits all features unrelated to its purpose of converting webarchive files so other browsers can open them. In particular, pywebarchive does not support writing webarchive files, and there are no plans to add this in a future release.

pywebarchive's internals are fairly well-documented. The code includes extensive comments explaining how it works and why it does various things the way it does. In addition, pywebarchive features dozens of unit tests to ensure the code actually does what we think it does, which is further confirmed by manual testing before each release.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywebarchive-0.5.1.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

pywebarchive-0.5.1-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file pywebarchive-0.5.1.tar.gz.

File metadata

  • Download URL: pywebarchive-0.5.1.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.8

File hashes

Hashes for pywebarchive-0.5.1.tar.gz
Algorithm Hash digest
SHA256 e5d9ba11f131689ca4daa866af30e5c3f0535823a881fa0a98c530bc147df99e
MD5 d71b485e106d45bbb966d3339fb3b7c4
BLAKE2b-256 4c9d276a7da73339055a9acad3cbe63393057e9c2efd758ce4a8ca9672817a1a

See more details on using hashes here.

File details

Details for the file pywebarchive-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: pywebarchive-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.8

File hashes

Hashes for pywebarchive-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48e9ec24b67e807e3998b3464e8c9f1911850140e3a640b9b8c9366dc9b7d0ff
MD5 30a9d61d217d28ba750d3db9824215b4
BLAKE2b-256 69e4cb54c57e13c33e707aa79293c27d0060d1c5958185e849319e838a841f6d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page