Closed PrivacyDevel closed 2 years ago
Discover/Trending is not working Maybe because version is lower Despite, it's working
Thanks for letting me know! I updated everything and tested it. Should be working now. :)
I can't access to any profile
@x0rld proxitok/tik tok problem Official too 2.4 ProxiTok or 2.2 TikTok Scraper* problem
ok
I can't access to any profile
That issue has been fixed thanks to pablouser1/TikScraperPHP@53024570fe8a0258d911e5a245fe582090739a19
The official instance has been updated so it should work now. Looks like TikTok is making changes again?
Also, @PrivacyDevel thanks for hosting it again! I've added it to the instance list, make sure to update to the latest version of the Scraper (2.2.1.0), it should work properly now.
I can't access to any profile
That's strange. Profiles seem to be working just fine for me. Could you maybe give me a link to a profile that's broken?
Thank you, @pablouser1! I'll update it now.
Uhm... I updated it and after that it stopped working for me... Rolled back to 67c080e5f49ad34baefa9399dbe1cf2d8ca49e78 for now, as that actually still works for me.
it works for me too thx ! 🎉
Never mind. I've replaced tiktok-signature with SignTok now and updated ProxiTok to the newest version. Everything seems to be working like this and it's much lighter on resources too. Nice. :)
Everything seems to be working like this and it's much lighter on resources too. Nice. :)
@PrivacyDevel, so you can close issue now, if no problems anymore :D
I was about to close it but... Now now profiles don't seem to be working anymore for some reason... :( I didn't change anything and even tried to use the official signer, just to make sure. Still broken... And yet there are other instances, like the official herokuapp one that still work... Any ideas how I could fix that? Or do I just have to wait it out again...?
How did you set up your instance?
I set it up manually. I've used https://signtok.vercel.app/api/signature
as well as my own and it doesn't really work with either of them. I just get the same error from that screenshot before. I don't see anything in the logs that would help me in any way. When I start a server with php -S ADDRESS
and read the console output, I don't see anything either. And when I comment out API_SIGNER_URL completely, not even the discover page will load anymore, and I get an error saying that it can't connect to the signer..
I tried to revert back to the second newest commit but that did not help either. And apparently I'm not blacklisted either.
I'm starting to run out of ideas... And I really don't want to go back to the second second newest commit with the old chromium based signer if I can avoid it.
It's kinda strange, that video works So it's double weird, and signer maybe not the problem
What if IP ban? Have you tried curl request?
Also, can make theory that something wrong with cache engine
Yeah, Idk... I removed the files inside of the cache folder before (not including the directories themselves) and that didn't make any difference either. And now I re-cloned it and executed the composer install again as well. Exact same situation. The video you linked me works as well but user pages do not.
I tried the curl command and got an HTML document with a lot of JS as a response. The HTTP code was 200 and the title was just "TikTok". And to be extra sure, I used my server as a proxy for Firefox real quick to check if https://tiktok.com still works correctly, and it does. So no problems there, apparently.
I did not enable JSON nor Redis caching btw. So that should probably not be the issue either, I'd assume.
I tried Docker image with no env variable API_CACHE
It's not the same error, but No items sent by TikTok!
So it could be the problem
Edit: maybe it's problem just with me... But at least try? 🤔
I tried it with and with API_CACHE
unset, set to json
(and it does create those JSON cache files, I checked) and set to redis
with the other required host and port envs set accordingly. Still the exact same issue.
Aaaand now it just works.... Wtf?
Never mind. It's still broken most of the time... Sometimes it works for a short while and then it breaks again.. I even installed php8 and tried it with that to more closely match the Docker image but that did not make any difference either.
Currently I installed the following packages from the default Debian stable repos for ProxiTok: composer php-redis php-curl php-zip php-fpm php-dom
And all of this sits behind an nginx reverse proxy. I set up my own SignTok instance on the same host and my instance works equally well / bad with that one as it does with the official one. I'm pretty damn sure URLs are not incorrect either because the error message changes when I intentionally provide an invalid URL. There are no error messages in the php logs whatsoever. I'm not blocked by tiktok.com, sometimes everything works just fine and then the user pages just break again.. I really don't know what I can try anymore at this point short of using the Docker image, which I do not want to use. Then again, I did follow the commands of the Dockerfile basically verbatim.
Again my stupid thoughts, but I just place it here: https://github.com/oberd/php-8.1-apache/blob/main/README.md#pre-installed-php-extensions You can watch through the list if helps
Ok, well, I finally bit the bullet and installed and tried to test it with Docker on my server with the exact same results from before...
The command that I used to test this with was the following:
docker run -it --rm -p 5112:80 -e LATTE_CACHE=/tmp -e API_SIGNER_URL=https://signtok.vercel.app/api -e API_SIGNER=remote ghcr.io/pablouser1/proxitok:master
Oh my.... Would you look at that. Apparently it IS an IP ban of sorts after all! I just tried to change the user agent string before to check if that changes anything, which it didn't. And now I just patched the few curl calls in the tikscraper library to use a proxy and voila! It works!
I guess I will see where this is actually necessary and create a pull request for that workaround to the tikscraper repo.
Ok, fixed it now. I just set a proxy for the curl calls in the Sender.php file from tikscraper. It does not seem to be necessary in the other places and would just needlessly slow things down there. I also enabled Redis caching now, which should lower the number of requests that my server sends to TikTok by a lot as well and speed up user page loads.
I'm not sure if I actually should submit a patch to tikscraper tho because it seems like a really ugly hack. But I guess it would be an option to add support for a SENDER_PROXY environment variable?
Anyway, for anybody that runs into this problem as well, this is how I solved it. And really do make sure to enable JSON or Redis caching as well.
Hi @PrivacyDevel, TikScraper has proxy support but ProxiTok doesn't have any enviromental variables to modify it. I'll add it on the next release.
That would be great! :) And if you could add a special one that only get used in Sender.php that would be perfect! This is the only place where I seemed to need it the other calls apparently still worked. And using a proxy in places where you don't need to just needlessly slows things down.
I've added Proxy support on 96fb2fd4285cb35ddc2b11438726d185621753fd
Please update both ProxiTok and TikScraper and check https://github.com/pablouser1/ProxiTok/wiki/Configuration#proxy for the env variables required
And if you could add a special one that only get used in Sender.php that would be perfect
Right now requests are only sent through a proxy if it goes to TikTok. Any other required external service (Signer) doesn't has the option to use a proxy
Since ProxiTok is working again, I am now hosting it again as well. :)