Skip to content

Instantly share code, notes, and snippets.

@bbinet
Forked from dtxe/scrape_bible_plan.sh
Created December 11, 2023 15:54
Show Gist options
  • Save bbinet/a8c461fc5abf605e4a43964d75ee6720 to your computer and use it in GitHub Desktop.
Save bbinet/a8c461fc5abf605e4a43964d75ee6720 to your computer and use it in GitHub Desktop.
Scrape BibleProject discussion posts from YouVersion bible plans
#!/bin/bash
PLANID=12345678
JWTTOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment