Skip to main content

A python module to extract browser history

Project description

browser-history

tests Documentation Status PyPI version codecov Code style: black Maintainability

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 --help from 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.7+.
  • 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-history organization (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

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


Download files

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

Source Distribution

browser_history-0.4.1.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

browser_history-0.4.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file browser_history-0.4.1.tar.gz.

File metadata

  • Download URL: browser_history-0.4.1.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for browser_history-0.4.1.tar.gz
Algorithm Hash digest
SHA256 21f2dd03127f835062ebd4852aeff80dc4afee25676eb08245c23fe94539aa5b
MD5 bb1ce5cb76f4b8bde9f50b964c72ffcb
BLAKE2b-256 602276d11c62a41f6deec0c176632dc0942f4cf250512c5fb8313af252fa7841

See more details on using hashes here.

File details

Details for the file browser_history-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for browser_history-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4fad5e59121f2d2e7e55db8a9ca70a8a5a53791a2f2dc354feeb348c1422b1cb
MD5 3e0e4a58bff94858eb6d657319235df6
BLAKE2b-256 611b127acd362c3a2ca23d2f9e4e46813e9fb7f36668d13e349b04b8bb5bd04d

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