TheAssassin / kodi-invidious-plugin

Invidious plugin for Kodi. A privacy-friendly way of viewing YouTube videos, built using the awesome Invidious service's API.
MIT License
50 stars 16 forks source link

Error http 403 #20

Closed stemy2 closed 1 year ago

stemy2 commented 1 year ago

Hello,

I can't search any video, any attempt, no matter the instance i choose, return a HTTP 403 error.

Here's the log:


2022-10-23 17:11:17.787 T:2151    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'requests.exceptions.ConnectionError'>
                                                   Error Contents: HTTPSConnectionPool(host='invidious.puffyan.us', port=443): Max retries exceeded with url: /api/v1/search?q=alegria+karaoke&sort_by=upload_date (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f35fcaf6600>: Failed to establish a new connection: [Errno -2] Name or service not known'))
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 174, in _new_conn
                                                       conn = connection.create_connection(
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/util/connection.py", line 72, in create_connection
                                                       for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
                                                     File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
                                                   socket.gaierror: [Errno -2] Name or service not known

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 703, in urlopen
                                                       httplib_response = self._make_request(
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 386, in _make_request
                                                       self._validate_conn(conn)
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 1040, in _validate_conn
                                                       conn.connect()
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 358, in connect
                                                       self.sock = conn = self._new_conn()
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 186, in _new_conn
                                                       raise NewConnectionError(
                                                   urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f35fcaf6600>: Failed to establish a new connection: [Errno -2] Name or service not known

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/script.module.requests/lib/requests/adapters.py", line 440, in send
                                                       resp = conn.urlopen(
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 785, in urlopen
                                                       retries = retries.increment(
                                                     File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/util/retry.py", line 592, in increment
                                                       raise MaxRetryError(_pool, url, error or ResponseError(cause))
                                                   urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='invidious.puffyan.us', port=443): Max retries exceeded with url: /api/v1/search?q=alegria+karaoke&sort_by=upload_date (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f35fcaf6600>: Failed to establish a new connection: [Errno -2] Name or service not known'))

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.invidious/resources/lib/invidious_addon.py", line 18, in <module>
                                                       sys.exit(main())
                                                     File "/storage/.kodi/addons/plugin.video.invidious/resources/lib/invidious_addon.py", line 14, in main
                                                       return plugin.run()
                                                     File "/storage/.kodi/addons/plugin.video.invidious/resources/lib/invidious_plugin.py", line 160, in run
                                                       self.display_search()
                                                     File "/storage/.kodi/addons/plugin.video.invidious/resources/lib/invidious_plugin.py", line 82, in display_search
                                                       results = self.api_client.search(search_input)
                                                     File "/storage/.kodi/addons/plugin.video.invidious/resources/lib/invidious_api.py", line 77, in search
                                                       response = self.make_get_request("search", **params)
                                                     File "/storage/.kodi/addons/plugin.video.invidious/resources/lib/invidious_api.py", line 38, in make_get_request
                                                       response = requests.get(assembled_url, params=params, timeout=5)
                                                     File "/storage/.kodi/addons/script.module.requests/lib/requests/api.py", line 75, in get
                                                       return request('get', url, params=params, **kwargs)
                                                     File "/storage/.kodi/addons/script.module.requests/lib/requests/api.py", line 61, in request
                                                       return session.request(method=method, url=url, **kwargs)
                                                     File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 529, in request
                                                       resp = self.send(prep, **send_kwargs)
                                                     File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 645, in send
                                                       r = adapter.send(request, **kwargs)
                                                     File "/storage/.kodi/addons/script.module.requests/lib/requests/adapters.py", line 519, in send
                                                       raise ConnectionError(e, request=request)
                                                   requests.exceptions.ConnectionError: HTTPSConnectionPool(host='invidious.puffyan.us', port=443): Max retries exceeded with url: /api/v1/search?q=alegria+karaoke&sort_by=upload_date (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f35fcaf6600>: Failed to establish a new connection: [Errno -2] Name or service not known'))
                                                   -->End of Python script error report<--

2022-10-23 17:11:17.984 T:2151     INFO <general>: Python interpreter stopped
2022-10-23 17:11:18.001 T:2150    ERROR <general>: GetDirectory - Error getting plugin://plugin.video.invidious/?action=search_video
2022-10-23 17:11:18.005 T:1136    ERROR <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.invidious/?action=search_video) failed
2022-10-23 17:11:18.064 T:2189     INFO <general>: initializing python engine.
2022-10-23 17:11:18.157 T:2189     INFO <general>: CPythonInvoker(95, /storage/.kodi/addons/plugin.video.invidious/resources/lib/invidious_addon.py): script aborted
TheAssassin commented 1 year ago

There's not a single 403.

Name or service not known

The DNS lookup just fails. Nothing that the plugin can fix for you. Make sure you can reach the instance you chose from a browser.

stemy2 commented 1 year ago

There's not a single 403.

Name or service not known

The DNS lookup just fails. Nothing that the plugin can fix for you. Make sure you can reach the instance you chose from a browser.

The said instances can be reached from a browser.

TheAssassin commented 1 year ago

Have you tried whether the issue persists, though?

stemy2 commented 1 year ago

I did, and the issue persists.

TheAssassin commented 1 year ago

Please elaborate on why you thought/think that this is a 403 (HTTP "Forbidden") problem.

stemy2 commented 1 year ago

This is what says the error message that appears at the bottom when i'm trying to execute the addon.

TheAssassin commented 1 year ago

Could you make a screenshot, please? (Not sure how that works with Kodi.)