Closed AdrianoRamalho21 closed 4 years ago
Resolution: Seems like the embed url of the videos have a hexdecimal timestamp in it lol
The seconde parameter of the URL, '5f10bbec', is a hexdecimal timestamp, all I have to do is convert it to unix timestamp, save it and compare it with the "now" timestamp and update it :)
Glad you figured this out.
If you feel there is a need for this in the package at all, feel free to provide a PR of some sort and we can get it merged in.
It all really depends on what you wanna do with it on your application, and your DB structure etc.
When I get like, 10 videos from a user, all those videos come with an updated embed video url as well as an updated thumbnail url. The thing is, embed video urls expire in 6 hours and thumbnails urls expire in 2 days...
I just have to save the expire timestamp (video_url_expire_date or thumbnail_url_expire_date) alongside with the video information, and than I run a command every now and then to scan all those expire_dates, if its outdated, I scrap that specific video and update the video_url, thumbnail_url and the new_expire_date...
As you can see, I dont think it can be a "feature" in the package, because when you scrap for videos, specific or through a user, you always get those with updated urls ;)
Totally, I guess I meant more of if you need a method to easily get the decoded expiration date.
TikTok embed videos are expiring from time to time, unkown actually. As thumbnails urls expire too, but these have a unix timestamp in it's url, "expires=1594886400..." but the embed videos doesnt have one...
Is there any way to know the expire time for the embed videos? "$video->video->playAddr;"
Thank you in advance ;)