rss-bridge
rss-bridge copied to clipboard
Netflix Brazil - What's New failed with error 500
HttpException: https://unogs.com/api/search?query=new+last+7+days&countrylist=29&limit=10 resulted in 500 Internal Server Error in lib/contents.php line 202
index.php(7): RssBridge->main()
lib/RssBridge.php(15): RssBridge->run()
lib/RssBridge.php(92): DisplayAction->execute()
actions/DisplayAction.php(133): UnogsBridge->collectData()
bridges/UnogsBridge.php(166): UnogsBridge->getJSON()
bridges/UnogsBridge.php(98): getContents()
lib/contents.php(202)
Query string: action=display&bridge=UnogsBridge&context=Country&country_code=29&feed=new+last+7+days&limit=10&format=Html
Version: dev.2023-03-22 (git.master.2e2f050)
Os: Linux
PHP version: 8.0.27
At first view, I think that now it needs a bearer token that we got doing a POST on /api/user endpoint with a post field user_name = new Date() / 1000
.
If I can make it work I will make a PR but I hope someone will be faster because I'm struggle with php.
I did a dirty fix, it looks like it's working.
I will see to do a proper fix or if someone wants to do one, it's good for me too.
Edit: I fixed another error that I got only for some country expiration, and I remarked that it's best to keep the limit at the default value.
--- a/bridges/UnogsBridge.php
+++ b/bridges/UnogsBridge.php
@@ -157,7 +157,7 @@ EOD;
// https://rapidapi.com/unogs/api/unogsng/details
$api_url = sprintf(
'%s/api/search?query=%s%s&limit=%s',
- self::URI,
+ 'https://unogs-unogs-v1.p.rapidapi.com',
urlencode($feed),
$country_code ? '&countrylist=' . $country_code : '',
$limit
requires api key from account https://docs.rapidapi.com/docs/keys