Scraper example using bible.com as the source.

Steve Thielemann 70e4996912 Fixed find_files, search by extension. 10 tháng trước cách đây
src 70e4996912 Fixed find_files, search by extension. 10 tháng trước cách đây
.gitignore f6790cbbbc Making a single request to httpbin.org. 10 tháng trước cách đây
Cargo.lock 507c90360f Added user agent updater. 10 tháng trước cách đây
Cargo.toml 507c90360f Added user agent updater. 10 tháng trước cách đây
README.md 736758e4bd Added extract --output for JSON output. 10 tháng trước cách đây
fetch1.html 060db0ff68 Initial working parser for verses. 10 tháng trước cách đây
initial.config 507c90360f Added user agent updater. 10 tháng trước cách đây

README.md

Rust - Reqwest and Scraper example

This is an example web scraper project. It downloads and extracts the Bible from https://www.bible.com.

User-Agent

The program will update the user-agent string it uses via https://www.mozilla.org/en-US/firefox/releases/ because I can.

-a or --agent-update

Bible versions

  • ESV
  • NIV
  • YLT98
  • KJV
  • NASB2020
  • MKJV

-v NIV

Relative/absolute URLs

See relative_to_absolute(url: &str, href: &str) -> Result to properly handle those.

Using

  • Copy initial.config to app.config.
  • Make a bible directory.
  • Run the fetch command.
  • Run the extract command. Try the --output option.
  • Run the verse command.