Skip to main content

A simple module to extract browsers's history.

Project description

BrowserHistory Module

browserhistory is a simple Python module that extracts browsers's history from a user's local computer and writes the data to csv files.

Platforms: Linux, MacOS, and Windows. Suported Browsers: Firefox, Google Chrome, and Safari.

Installation

$ python3 -m pip install browserhistory

or

$ git clone https://github.com/kcp18/browserhistory

Overview

Functions:

  • get_browserhistory() -> dict
  • get_database_paths() -> dict
  • get_username() -> str
  • write_browserhistory_csv() -> None

Example:

Example
-------
>>> import browserhistory as bh
>>> dict_obj = bh.get_browserhistory()
>>> dict_obj.keys()
>>> dict_keys(['safari', 'chrome', 'firefox'])
>>> dict_obj['safari'][0]
>>> ('https://mail.google.com', 'Mail', '2018-08-14 08:27:26')
# Write the data to csv files in the current working directory.
# safari_browserhistory.csv, chrome_browserhistory.csv, and firefox_browerhistory.csv.
>>> bh.write_browserhistory_csv()

The Description of browserhistory

NAME

    browserhistory

FUNCTIONS

    get_browserhistory() -> dict
        Get the user's browsers history by using sqlite3 module to connect to the dabases.
        It returns a dictionary: its key is a name of browser in str and its value is a list of
        tuples, each tuple contains four elements, including url, title, and visited_time. 

    get_database_paths() -> dict
        Get paths to the database of browsers and store them in a dictionary.
        It returns a dictionary: its key is the name of browser in str and its value is the path to database in str.

    get_username() -> str
        Get username based on their local computers

    write_browserhistory_csv() -> None
        It writes csv files that contain the browser history in
        the current working directory. It will writes csv files base on 
        the name of browsers the program detects.

Issue Report

If you have any questions or find bugs in the module,
please report the issues/questions at the follwing address.

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

browserhistory-0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browserhistory-0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file browserhistory-0.1.tar.gz.

File metadata

  • Download URL: browserhistory-0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for browserhistory-0.1.tar.gz
Algorithm Hash digest
SHA256 a6e7c14bcd1fa0864b0266971d5eeeb4cd0ea77845b8a6f4b9fb87d1d1a23406
MD5 3b6ca0729c38f448673c25192a0903f3
BLAKE2b-256 ae686c17e3420a9cb1783a47bc0ae80db4cf7e3695bcb1ace498f01295508485

See more details on using hashes here.

File details

Details for the file browserhistory-0.1-py3-none-any.whl.

File metadata

  • Download URL: browserhistory-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for browserhistory-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa84e8de3c7fdb37ad649df6aad6715ab7ee4f775a68ed1647db38d35d1ef177
MD5 f9bc3a40c376172f5192ceac06295a06
BLAKE2b-256 afb4ce05871b4c9c9ede0e8ce155f562fb69d841f67f8252a937a1c2e7480075

See more details on using hashes here.

Supported by

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