Skip to content

Instantly share code, notes, and snippets.

@dtxe
Last active December 11, 2023 17:32
Show Gist options
  • Save dtxe/9b8e1426bf71edb1248a2f185453c2cb to your computer and use it in GitHub Desktop.
Save dtxe/9b8e1426bf71edb1248a2f185453c2cb to your computer and use it in GitHub Desktop.
Scrape BibleProject discussion posts from YouVersion bible plans
#!/bin/bash
PLANID=12345678
JWTTOKEN={{TOKEN}}
for DAY in {1..365}
do
curl 'https://plans.youversionapi.com/4.0/together/$PLANID/activities?day=$DAY&page=1&order=desc&talk_it_over=0' \
-H 'authority: plans.youversionapi.com' \
-H 'x-youversion-app-version: 4' \
-H 'x-youversion-client: youversion' \
-H 'accept-language: en' \
-H 'authorization: Bearer $JWTTOKEN' \
-H 'content-type: application/json' \
-H 'accept: application/json' \
-H 'cache-control: no-cache' \
-H 'x-youversion-app-platform: web' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36' \
-H 'origin: https://my.bible.com' \
-H 'sec-fetch-site: cross-site' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
-H 'referer: https://my.bible.com/' \
--compressed
-O $DAY.json
done
@bbinet
Copy link

bbinet commented Dec 11, 2023

Also, how did you find the "https://plans.youversionapi.com/4.0/together/$PLANID/activities?day=$DAY&page=1&order=desc&talk_it_over=0" API ?
When I use the web version, I cannot see any request to the plans.youversionapi.com domain in developer tools on Network tab...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment