A python module to extract browser history
Project description
browser-history
browser-history is a simple, zero-dependencies, developer-friendly python
package to retrieve (almost) any browser's history on (almost) any platform.
Features
- Supports most popular browsers. See this for a full list.
- Supports all major platforms - Windows, Mac and Linux.
- A command-line tool: simply run
browser-history --helpfrom your terminal. - History: browsing history with exact timestamp and URL.
- Bookmarks: browser bookmarks with timestamp, URL, title and folder.
- Lightweight: the entire package is less than 20kB in size and has no dependencies other than python 3.8+.
- Developer friendly: you can add support for new browsers or add a new feature very easily.
- Default browser: can automatically determine the default browser on Windows and Linux (
browser-history -b default). - Fully open source: this project is developed and maintained by the
browser-historyorganization (previously maintained by PESOS) and will always be open source (with the Apache 2.0 License).
Quick Start
Installation
To install the latest release:
pip install browser-history
To install from the master branch (warning: development version. Things could break)
pip install git+https://github.com/browser-history/browser-history.git
Usage
History
To get history from all installed browsers:
from browser_history import get_history
outputs = get_history()
# his is a list of (datetime.datetime, url) tuples
his = outputs.histories
If you want history from a specific browser:
from browser_history.browsers import Firefox
f = Firefox()
outputs = f.fetch_history()
# his is a list of (datetime.datetime, url) tuples
his = outputs.histories
Firefoxin the above snippet can be replaced with any of the supported browsers.
Bookmarks
WARNING: Experimental feature. Although this has been confirmed to work on multiple (Firefox and Chromium based) browsers on all platforms, it is not covered by tests and has not been used as much as the history feature.
To get bookmarks from all installed browsers:
from browser_history import get_bookmarks
outputs = get_bookmarks()
# bms is a list of (datetime.datetime, url, title, folder) tuples
bms = outputs.bookmarks
To get bookmarks from a specific browser:
from browser_history.browsers import Firefox
f = Firefox()
outputs = f.fetch_bookmarks()
# bms is a list of (datetime.datetime, url, title, folder) tuples
bms = outputs.bookmarks
Check out the documentation for more details.
Supported Browsers
Read the documentation
Credits
Logo designed with :heart: by XA.
License
Licensed under the Apache License, Version 2.0 (the "License")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file browser_history-0.5.0.tar.gz.
File metadata
- Download URL: browser_history-0.5.0.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
969a0e571ac0a01347c78c3e0d96d4e0dbad6c64e1926279171e54caa8bba3c1
|
|
| MD5 |
cf6aa80b2644950d0d1cd975251c26a3
|
|
| BLAKE2b-256 |
c6b68856ca0cc0331d19e9e28d37f53a272eac82a74035de439f14d9334b3866
|
Provenance
The following attestation bundles were made for browser_history-0.5.0.tar.gz:
Publisher:
python-publish.yml on browser-history/browser-history
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
browser_history-0.5.0.tar.gz -
Subject digest:
969a0e571ac0a01347c78c3e0d96d4e0dbad6c64e1926279171e54caa8bba3c1 - Sigstore transparency entry: 780805539
- Sigstore integration time:
-
Permalink:
browser-history/browser-history@943dd5e5d14246b8fbdb05874b56544cfb220e07 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/browser-history
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@943dd5e5d14246b8fbdb05874b56544cfb220e07 -
Trigger Event:
release
-
Statement type:
File details
Details for the file browser_history-0.5.0-py3-none-any.whl.
File metadata
- Download URL: browser_history-0.5.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77560ebc4c40ecad956e8201eba44a1dd5ad866e618a1ad88f30fcfef315cae3
|
|
| MD5 |
dc1c59cd011e0be8ad65f7486f0f673c
|
|
| BLAKE2b-256 |
ff1dff5896cbec74572a8e0024a40b0ce624fa443a5754d5efad129c983cf411
|
Provenance
The following attestation bundles were made for browser_history-0.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on browser-history/browser-history
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
browser_history-0.5.0-py3-none-any.whl -
Subject digest:
77560ebc4c40ecad956e8201eba44a1dd5ad866e618a1ad88f30fcfef315cae3 - Sigstore transparency entry: 780805540
- Sigstore integration time:
-
Permalink:
browser-history/browser-history@943dd5e5d14246b8fbdb05874b56544cfb220e07 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/browser-history
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@943dd5e5d14246b8fbdb05874b56544cfb220e07 -
Trigger Event:
release
-
Statement type: