frankvHoof93 / TikTokLiveSharp

Port of TikTok live library for C#
https://vanhoof.dev
Other
148 stars 31 forks source link

[BUG] Your IP or country might be blocked by TikTok #89

Open nicatjava opened 1 month ago

nicatjava commented 1 month ago

**FailedFetchRoomInfoException: Your IP or country might be blocked by TikTok. UnityEngine.Debug:LogException(Exception, Object) TikTokLiveSharp.Client.d52:MoveNext() (at ./Library/PackageCache/dev.vanhoof.tiktokliveunity@18ae546fb8/TikTokLiveSharp/Client/TikTokBaseClient.cs:646) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(String) TikTokLiveSharp.Client.HTTP.d8:MoveNext() (at ./Library/PackageCache/dev.vanhoof.tiktokliveunity@18ae546fb8/TikTokLiveSharp/Client/HTTP/TikTokHTTPClient.cs:107) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(HttpContent) TikTokLiveSharp.Client.HTTP.<GetRequest>d__13:MoveNext() (at ./Library/PackageCache/dev.vanhoof.tiktokliveunity@18ae546fb8/TikTokLiveSharp/Client/HTTP/TikTokHTTPClient.cs:221) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(HttpContent) TikTokLiveSharp.Client.HTTP.d24:MoveNext() (at ./Library/PackageCache/dev.vanhoof.tiktokliveunity@18ae546fb8/TikTokLiveSharp/Client/HTTP/TikTokHttpRequest.cs:186) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(HttpContent) TikTokLiveSharp.Client.HTTP.d29:MoveNext() (at ./Library/PackageCache/dev.vanhoof.tiktokliveunity@18ae546fb8/TikTokLiveSharp/Client/HTTP/TikTokHttpRequest.cs:268) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(HttpResponseMessage) TikTokLiveSharp.Client.HTTP.d__28:MoveNext() (at ./Library/PackageCache/dev.vanhoof.tiktokliveunity@18ae546fb8/TikTokLiveSharp/Client/HTTP/TikTokHttpRequest.cs:242) UnityEngine.UnitySynchronizationContext:ExecuteTasks()

** In our country Tiktok not blocked. Also I can open live from my account on phone. What is the problem? Till Yesterday code will work perfectly, and from now it not works... Can anyone has information about this?

nicatjava commented 1 month ago

Also with TiktokLiveJava works perfectly

hideki1217 commented 1 month ago

me too. When I used it from Japan, same exception was thrown. but I can watch TikTok Live now. Is there some problems in this library? What is it ??

Rambalac commented 1 month ago

There is a mistake in regex in file TikTokBaseClient.cs:628

Match second = Regex.Match(html, "\"roomId\":\"([0 - 9] *)\"");

Must be

Match second = Regex.Match(html, "\"roomId\":\"([0-9]+)\"");
nicatjava commented 1 month ago

There is a mistake in regex in file TikTokBaseClient.cs:628

Match second = Regex.Match(html, "\"roomId\":\"([0 - 9] *)\"");

Must be

Match second = Regex.Match(html, "\"roomId\":\"([0-9]+)\"");

Reply: no bro, it is not works for me :(

Rambalac commented 1 month ago

Line 320 too. It works for me

nicatjava commented 1 month ago

Friends, Still i have same problem, PLease somebody help me! All my followers wait to play my game :'(

jirohn commented 1 month ago

i have the same problem, i change the two lines in TikTokBaseClient but still not working

nicatjava commented 1 month ago

Still Nobody answer why we get this error and our Followers waiting our game when it start again...

hideki1217 commented 1 month ago

It looks like this issue has been fixed in a pull request. Please adopt the pull request and let us know if it works!

nicatjava commented 1 month ago

OMG! It works! Thanks Rambalac, thanks hideki1217!

hideki1217 commented 1 month ago

I'm glad you are cured. Since you tried this pull request and reported your results, I will use this pull request as well! Thanks for the report!

Creat-coin commented 1 month ago

FailedFetchRoomInfoException : Could not find RoomId on Webpage. Your IP or country might be blocked by TikTok.