pybro is a python module that provide access to different browsers database.
Currently, pybro supports Firefox, Google Chrome and Chrominum.
Python 3 should be installed, or just downlod and install it.
- Open command prompt
$ pip install pybro
Or :
$ git clone https://github.com/ahmed-BH/pybro.git
$ cd pybro
$ python setup.py install
>>> import pybro
>>> pybro.Browser.get_supported_br()
- Get a list of currently supported browsers
>>> import pybro
>>> browser = pybro.Browser(name="firefox")
- Idicate which browser to use using name keyword
- if the entered browser is not valid or is unsupported yet, a ValueError exception will be raised.
>>> key_words = browser.get_keyword_search(max=10)
>>> for i in key_words :
>>> print(i)
- Provide max returned result or just don't provide max value to get all result.
>>> downloads = browser.get_downloads(max=5)
>>> for i in downloads :
>>> print(i["filename"])
- get_downloads method returns a list of dicts, its keywords are :
- file_name
- file_type
- file_size
- site_url
- full_url
- start_time
- state
- received_bytes
- danger
>>> visits = browser.get_visited_ws(max=5)
>>> for i in visits :
>>> print(i["url"])
- get_visited_ws() method returns a list of dicts sorted by nb_visits, its keywords are :
- url
- last_visit_time
- nb_visits
>>> bmarks = browser.get_bookmarks(max=7)
>>> for i in bmarks :
>>> print(i["title"])
- get_bookmarks() method returns a list of dicts sorted by nb_visits, its keywords are :
- url
- title
>>> fill = browser.get_autoFill(max=7)
>>> for i in fill :
>>> print(i["value"])
- get_autoFill() method returns a list of dicts, its keywords are :
- value
- date_last_used
Firefox | Chrome/Chromium | |
---|---|---|
Linux | ~/.mozilla/firefox/ | ~/.config/google-chrome ~/.config/google-chrome-beta ~/.config/google-chrome-unstable ~/.config/chromium |
Mac OS | ~/Library/Mozilla/Firefox/Profiles/ ~/Library/Application Support/Firefox/Profiles/ | ~/Library/Application Support/Google/Chrome ~/Library/Application Support/Chromium ~/Library/Application Support/Google/Chrome Canary |
Windows | %AppData%/Mozilla/Firefox/Profiles/ | %LOCALAPPDATA%\Google\Chrome\User Data\ChromeDefaultData %LOCALAPPDATA%\Chromium\UserData %LOCALAPPDATA%\Google\Chrome SxS\UserData |
- Support Opera browser
- Support Safari browser
- Support Microsoft Edge 😨