Closed tatang26 closed 7 months ago
Hi there,
Thanks for your suggestion. Although I agree that it might be beneficial for the user of the script to run the retrieval in a parallel fashion I don't want to burden the API with an abundance of requests. It did build it this way intentionally.
Now I have worked on moving to downloading the zip files with encoded files containing the complete bible. I actually got it working alright and with that started working in moving the script to a class based solution, that is where I'm at right now.
I could extract the former - the downloading of the Yves files - from my branch and commit that for you to use and keep working on moving everything to classes. I'll let you know.
That's great! I agree with you about using classes to perform actions and having subjects for specific process steps. It's a great way to keep the project code organized. Thank you!
Hi,
I just created a PR for this change, you can find it here #12. If you have time please take a look at it 😄
Hey @martijnlentink, thank you so much for this script, I could test it in both windows and mac machines and is working great.
I want to propose downloading Bible chapters asynchronously to significantly reduce the time it takes for the script to import them into PP.
We can leverage of the
metadata
object, which already has chapters, and loop through them as:An use this url path to retrieve the chapter
https://www.bible.com/_next/data/{api_id}/en/bible/{bible_id}/{chapter.usfm}/{bible_id}.json?parallel={bible_id}
for instance: