drawrowfly / tiktok-scraper

TikTok Scraper. Download video posts, collect user/trend/hashtag/music feed metadata, sign URL and etc.
4.44k stars 805 forks source link

Similar URLs behaving differently #782

Open sra-013 opened 2 years ago

sra-013 commented 2 years ago

Hey! I am facing a weird issue that I am unable to explain, any help would be appreciated.

I have 3 separate URLs of some tiktok videos; two of them (1 & 2 below) work fine as is but the third one (3 below) works only if there's a referer header present, otherwise it returns a 403. I am not sure why this is happening; the URLs look pretty similar to me. If anyone has any insights, it'd be great!

  1. https://v19-us.tiktokcdn.com/dae6c4fd5c6492bbd3de56d7a5ba2909/62e5705a/video/tos/useast2a/tos-useast2a-pve-0068/a6a1e94e8e4b41e485e3ca6a72fcaf8f/?a=1233&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C3&cv=1&br=2652&bt=1326&btag=80000&cs=0&ds=6&ft=ARJXEBnZqqpmo0P2mZjfkVQSMRX5_KJ&mime_type=video_mp4&qs=0&rc=OmdnOzo6MzxkODw0Z2ZnNUBpMzt0cDM6Zmh2PDMzNzczM0AxYDRjMi4zNjUxYWEwNDQ0YSNnMm01cjRnNnFgLS1kMTZzcw%3D%3D&l=202207301153290101910632050F4EE690&cc=25

  2. https://v16m-webapp.tiktokcdn-us.com/a0815b2b488a33204d60bc64fdb3c2ec/62e580e2/video/tos/useast2a/tos-useast2a-pve-0068/cca7d9424d8e4605b4396a0b6e33fcd9/?a=1988&ch=0&cr=0&dr=0&lr=tiktok_m&cd=0%7C0%7C0%7C0&br=3458&bt=1729&cs=0&ds=3&ft=ebtHKH1pMyq8Z.611we2NsDGfl7Gb&mime_type=video_mp4&qs=0&rc=OTQ2ZmdnMzo4ZDczZDk3Z0BpM3ZxeDw6ZnRmZTMzNzgzM0AyNmAuLzQuNmMxLS4yMy8wYSMyL15ucjRfcGFgLS1kLzZzcw%3D%3D&l=202207301305032D1BEF3A147F988E2895

  3. https://v16-web-newkey.tiktokcdn.com/5b2ed314281ff5054764ca9bd95f0f85/62e582c7/video/tos/useast2a/tos-useast2a-pve-0068/cca7d9424d8e4605b4396a0b6e33fcd9/?a=1988&ch=0&cr=0&dr=0&lr=tiktok_m&cd=0%7C0%7C0%7C0&br=3458&bt=1729&btag=80000&cs=0&ds=3&ft=lcLrKH._Myq8Z~P11we2NCewyl7Gb&mime_type=video_mp4&qs=0&rc=OTQ2ZmdnMzo4ZDczZDk3Z0BpM3ZxeDw6ZnRmZTMzNzgzM0AyNmAuLzQuNmMxLS4yMy8wYSMyL15ucjRfcGFgLS1kLzZzcw%3D%3D&l=202207301313080101910410190B55BE71