ssovit / TikTok-API-PHP

Unofficial TikTok API for PHP. Join our Discord server
https://discord.gg/rSQd2QAXA8
MIT License
145 stars 42 forks source link

getVideoByUrl() & getUser() are always false #48

Closed alina-ami closed 2 years ago

alina-ami commented 2 years ago

Describe the bug

I use the method getVideoByUrl for almost 6 months and since January 17 it started returning only false. We use the WebShare proxy as suggested. I did some debugging and I observed that the code fails at the regex part:

In Api.php:488

$result = Helper::string_between($result, '{"props":{"initialProps":{', "</script>");

And the page source returned by the curl call does not contain this string anymore. The same happens for getUser method.

To Reproduce Steps to reproduce the behavior:

Screenshots

$api = new \Sovit\TikTok\Api([ 
"proxy-host" => config('proxy.host'), 
"proxy-port" => config('proxy.port'),  
"proxy-username" => config('proxy.username'), 
"proxy-password" => config('proxy.password')
]);

$result = $api->getUser('moniquedias961'); // returns false
$result = $api->getVideoByUrl('https://www.tiktok.com/@ravmalik/video/7030873814435138821'); // returns false
arifrohmadi commented 2 years ago

[alina-ami] I got the same problem. how do you solve it?

ssovit commented 2 years ago

Re-open if issue still persists

a7maadf commented 1 year ago

@ssovit the issue is still there