Egsagon / nekosama

API for the Neko Sama anime website.
MIT License
2 stars 0 forks source link

IndexError #5

Closed MysticSaba-max closed 2 months ago

MysticSaba-max commented 2 months ago

image

Enter query or URL: naruto Found 10 animes for naruto:

    1. naruto-shippuuden
    1. naruto
    1. naruto-shippuuden-movie-7-the-last
    1. boruto-naruto-the-movie
    1. naruto-shippuuden-movie-6-road-to-ninja
    1. boruto-naruto-next-generations
    1. naruto-movie-1-dai-katsugeki-yuki-hime-shinobu-houjou-dattebayo
    1. naruto-shippuuden-movie-5-blood-prison
    1. boruto-naruto-the-movie-naruto-ga-hokage-ni-natta-hi
    1. naruto-shippuuden-movie-1 Select index (default=0): 0 Traceback (most recent call last): File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users****\AppData\Local\Programs\Python\Python312\Lib\socket.py", line 964, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno 11001] getaddrinfo failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 793, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Users\\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1099, in _validate_conn conn.connect() File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 616, in connect self.sock = sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x0000023C2B5B02F0>: Failed to resolve 'neko-sama.frhttps' ([Errno 11001] getaddrinfo failed)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users****\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='neko-sama.frhttps', port=443): Max retries exceeded with url: /neko-sama.fr/anime/info/1511-naruto-shippuuden_vostfr (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x0000023C2B5B02F0>: Failed to resolve 'neko-sama.frhttps' ([Errno 11001] getaddrinfo failed)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users**\Downloads\neko-sama-api-3.4.1\main.py", line 21, in print(f'Selected anime: \033[92m{anime.title}\033[0m') ^^^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\nekosama\core.py", line 374, in title return self.data['title'].replace(' | Neko-sama', '') ^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\nekosama\core.py", line 365, in data raw = self.get(self.url).text ^^^^^^^^^^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\nekosama\core.py", line 339, in get req = self.session.get(url, headers = headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 602, in get return self.request("GET", url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users****\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='neko-sama.frhttps', port=443): Max retries exceeded with url: /neko-sama.fr/anime/info/1511-naruto-shippuuden_vostfr (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x0000023C2B5B02F0>: Failed to resolve 'neko-sama.frhttps' ([Errno 11001] getaddrinfo failed)"))

can someone help me pls

Egsagon commented 2 months ago

Update your version, this should fix most errors :)