Skip to main content

A module to scrape biblehub.com, also cli app

Project description

biblehub

A python module (Formerly BibleHubScrapper) that retrieve vesand the information on it from biblehub.com. Also a simple commandline application.

Installation

pip3 install biblehub

Commandline

Find verses simply using the find command

biblehub find Matthew 2:4

Supports retrieving single verses, multiple verses, and chapters, but that's standard, a more useful feature is returning the information (cross reference, lexicons, and treasury of scripture)

To retrieve all the currently available information on a reference, use the '-a' tag:

biblehub find -a [Reference]

Note: Information is only available for single verse references (i.e Genesis 1:1), multiverse references(i.e Genesis 1:1-2) will not return information on each verse yet.

To only retrieve specific information, pass in the corresponding tag:

biblehub find -c [Reference] # Also retrieves the cross-references
biblehub find -t [Reference] # Also retrieves the lexicon

As with most cli tools, arguments can be stacked with one hyphen, such as:

biblehub find -cl [Reference] # Retrieves the cross-references and lexicon in addition to the passage

To retrieve all the versions for that reference, use the --versions tag

biblehub find --versions Genesis 2:4

To search biblehub use the search command

biblehub search Goliath

Contains optional arguments --ot and --nt to limit the results to the old or new testaments

Script Usage

You can import the query and get_versions methods to use in scripts.

from biblehub import find_verse, get_versions

biblehub_query = find_verse('Genesis 1:1')
all_versions = get_versions('Genesis 1:1')
print(biblehub_query.text) # In the beginning...
print(all_versions[0].passage)

By default, it will query all possible fields. You can choose not to query certain fields by indicating in the parameters for example: find_verse('Genesis 1:1', get_lexicons=False)

Useful fields

print(biblehub_query.passage) # Genesis 1:1
print(biblehub_query.version) # NIV (default)
print(biblehub_query.lexicons) # Text, Hebrew words, translit, strong, and English defintions
print(biblehub_query.crfs) # Cross References
print(biblehub_query.tos) # Treasury of Scripture
print(biblehub_query.info) # Prints all the info queried on the verse. Also the same as the __str__

there are also biblehub_query.format_[field] method that returns the specified field in an easy to read way.

Searching

from biblehub import search as b_search
list = b_search("Goliath", filter='nt')

Contributing

If you feel like improving the codebase, adding a feature, or checking my grammar, feel free! Checkout the issues I post for tasks you can help with, reference specific issues when making a PR. Make sure to send a pull request against the development branch.

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

biblehub-2.0a5.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

biblehub-2.0a5-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file biblehub-2.0a5.tar.gz.

File metadata

  • Download URL: biblehub-2.0a5.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for biblehub-2.0a5.tar.gz
Algorithm Hash digest
SHA256 45004115764e2e55adb94583ae7c7425c7e4a00cf429cf6e973cd0a9135df5bc
MD5 1cb17ede29c1d2caed664776bee04609
BLAKE2b-256 2fdc174e20b0098c180b738633b2f99bfdbff4c2155c530ced1814d1827200ba

See more details on using hashes here.

File details

Details for the file biblehub-2.0a5-py3-none-any.whl.

File metadata

  • Download URL: biblehub-2.0a5-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for biblehub-2.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 b14e5a87d7e687c28907529ad73c80326d826af96fdf2f7e76b3a003ee40f09d
MD5 6fb45af48ba451efb45847e6e8036e9e
BLAKE2b-256 617424af1c1dbd66dac36ac412d40cb7c7ab72468148c0fd3503a69b0f0c278d

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