estevao90 / openlp-bibles-sqlite

Web Scraping from bible.com to generate SQLite files to the OpenLP software.
MIT License
5 stars 3 forks source link

Regular Expression not separating bible books and chapters correctly #14

Open fitsie007 opened 2 years ago

fitsie007 commented 2 years ago

Hello, First, Thank you for this project. It is very helpful. Second, I know your code is written in a language like Portuguese. Is it possible to translate to English? If the code were in English, I would be able to fix the issue on my own. I tried to get your code to work to download English versions of the bible (example ESV), but the regular expression is not separating the chapter from the book names properly. For example, if the book has a number in front, such as "1 Timothy", only the number is inserted into the database. This then triggers an issue when inserting the verse into the database. In some cases the word is inserted as a chapter instead of a number. Please see the attached images

openlp_book_error openlp_chapter_error

below.

The initial url for the ESV version is https://nodejs.bible.com/api/bible/chapter/3.1?id=59&reference=

Thanks

estevao90 commented 2 years ago

Hi @fitsie007.

So, Yeah. The code is written in Brazilian Portuguese. We can translate it, sure, but I need some time to translate it. Please feel free to submit a pull request if you want to deal with it.

Thank you for the detailed issue specification. I'll take a look at the weekend and fix it. :)

fitsie007 commented 2 years ago

Thanks. I am unable to fix the issue because I can't understand that portion of the code due to it being in Portuguese.

estevao90 commented 2 years ago

No problem. I'll check it soon.

estevao90 commented 1 year ago

Hi @fitsie007

Sorry for the delay.

I've fixed that issue. Could you please check if is it working?

Thanks!