bbsan2k / plugin.video.f1tv

Kodi Plugin for F1TV Streaming service
MIT License
59 stars 11 forks source link

Matrix Support and API Fixes #47

Closed joeyberkovitz closed 3 years ago

joeyberkovitz commented 3 years ago

I've noticed that when trying to use this plugin I was getting blocked using the existing apikey/distribution channel method. I've adjusted the code to use the same API key and other authentication headers that are hardcoded into the Android app.

In addition I've incorporated some fixes and improvements for Matrix and switched caching over to the https://pypi.org/project/requests-cache/ module with a 3-second cache (although this can be reconfigured)

Let me know if this is reasonable.

bbsan2k commented 3 years ago

Thanks for sharing this! Is there a reason why you removed the apikey resolve method? I added this initially so it works even if they change or block it...

joeyberkovitz commented 3 years ago

@bbsan2k I removed the apikey resolution functionality because when I had it enabled and pulling the API key from the web, it seemed that the API was expecting the reese84 cookie to prove that the user isn't a robot. Without it I wasn't able to login. The hardcoded key I used is the same as that used on the current Android app. I do agree that if the API key changes, an update will be needed, but it's probably better than getting blocked occasionally.

TheDevFreak commented 3 years ago

@bbsan2k I removed the apikey resolution functionality because when I had it enabled and pulling the API key from the web, it seemed that the API was expecting the reese84 cookie to prove that the user isn't a robot. Without it I wasn't able to login. The hardcoded key I used is the same as that used on the current Android app. I do agree that if the API key changes, an update will be needed, but it's probably better than getting blocked occasionally.

Heads up on the reese84 cookie - the content can be anything you like, it just needs to be present and if your User-Agent is RaceControl it's not needed at all.