Follow lite.tiktok.com, same as v[mt].tiktok.com

Fixes https://github.com/pablouser1/ProxiTok/issues/222
This commit is contained in:
Yedaya Katsman
2024-08-18 22:59:09 +03:00
parent 358c6ad08f
commit 3eebeb0369
+1 -1
View File
@@ -71,7 +71,7 @@ class RedirectController {
* to_endpoint maps a TikTok URL into a ProxiTok-compatible endpoint URL.
*/
static private function to_endpoint(string $url): string {
if (preg_match('%^(?:https?://)?(?:www\.)?(?:vm\.|vt\.)?tiktok\.com/(?:t/)?([A-Za-z0-9]+)%', $url, $m)) {
if (preg_match('%^(?:https?://)?(?:www\.)?(?:vm\.|vt\.|lite\.)?tiktok\.com/(?:t/)?([A-Za-z0-9]+)%', $url, $m)) {
// Short video URL
return '/@placeholder/video/' . $m[1];
} elseif (preg_match('%^https://www\.tiktok\.com/(.+)%', $url, $m)) {