RobertGrubb / tiktok-php

TikTok scraper in PHP
MIT License
63 stars 21 forks source link

playAddr are wrong for user details and video details #36

Closed ghost closed 3 years ago

ghost commented 3 years ago

Describe the bug From the trending loop, the video do work: https://v77.tiktokcdn.com/7b02dba600aeaf89cf102aa445c61b30/5fac107d/video/tos/useast2a/tos-useast2a-ve-0068c004/ba80902bb77d48f3b3c1441ea56c4b61/?a=1233&br=3748&bt=1874&cr=0&cs=0&cv=1&dr=0&ds=3&er=&l=202011111025220101880612274D002AB1&lr=tiktok_m&mime_type=video_mp4&qs=0&rc=MzxqNzxkZmRldzMzZTczM0ApaTU7Ojk6ZjwzNzo0OjpmOGczMXJzNG1fZTZfLS0yMTZzc2FeYjAyMGBjMzIuYTEwYV86Yw%3D%3D&vl=&vr=

From the user and video details, the url for playAddr are completely different, destroying the whole video: https://v16-web.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c004/ba80902bb77d48f3b3c1441ea56c4b61/?a=1988&br=3748&bt=1874&cr=0&cs=0&cv=1&dr=0&ds=3&er=&expire=1605111957&l=202011111025470101901860143D002AD4&lr=tiktok_m&mime_type=video_mp4&policy=2&qs=0&rc=MzxqNzxkZmRldzMzZTczM0ApaTU7Ojk6ZjwzNzo0OjpmOGczMXJzNG1fZTZfLS0yMTZzc2FeYjAyMGBjMzIuYTEwYV86Yw%3D%3D&signature=e3ffc573ded3aac47aac7cba6eef77c3&tk=tt_webid_v2&vl=&vr=

Expected behavior playAddr for user and video details should have the same url as for trending. If it is, the video will not be destroyed.

RobertGrubb commented 3 years ago

Will look into this.

RobertGrubb commented 3 years ago

I have dug into this a bit. The ability to provide a video that doesn't expired based on the above information seems like more trouble at the moment than it is to just save the video as soon as you get the database back.

Will circle back to this in the future, however, right now the captcha issues trump this.