Skip to content

Scrape latest data #1501

Scrape latest data

Scrape latest data #1501

Workflow file for this run

name: Scrape latest data
on:
push:
workflow_dispatch:
schedule:
- cron: '*/5 * * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Fetch latest data
run: |-
curl -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15' "https://api16-normal-c-useast1a.tiktokv.com/aweme/v1/feed/?version_name=26.1.3&version_code=260103&build_number=26.1.3&manifest_version_code=260103&update_version_code=260103&ts=1684811896&device_brand=Google&device_type=Pixel+7&device_platform=android&resolution=1080*2400&dpi=680&os_version=10&os_api=29&carrier_region=US&sys_region=US&region=US&app_name=trill&app_language=en&language=en&timezone_name=America%2FNew_York&timezone_offset=-14400&channel=googleplay&ac=wifi&mcc_mnc=310260&is_my_cn=0&aid=1180&ssmix=a" | jq . > api-feed.json
curl -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15' https://www.tiktok.com/node/share/discover | jq . > discover-www.json
curl -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15' https://us.tiktok.com/node/share/discover | jq . > discover-us.json
curl -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15' https://www.tiktok.com/node/share/discover/list | jq . > discover-list-www.json
curl -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15' https://us.tiktok.com/node/share/discover/list | jq . > discover-list-us.json
curl -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15' https://tikfinity.zerody.one/api/getLiveChannels | jq .liveChannels > live-channels.json
curl -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15' "https://tikfinity.zerody.one/api/getAllGifts?app_language=en-US&browser_language=en&priority_region=US&region=US&webcast_language=en-US" | jq . > live-gift-details.json
- name: Commit and push if it changed
run: |-
git config user.name "TikTok Trending BOT"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push