jbweston / nord

An unofficial NordVPN client [DEPRECATED]
GNU General Public License v3.0
28 stars 4 forks source link

API Url not working anymore https://api.nordvpn.com/dns/smart #31

Open levydanqc opened 2 years ago

levydanqc commented 2 years ago

I don't know if the public api of NordVPN changed, but the url 'https://api.nordvpn.com/dns/smart' isn't working anymore...

It returns a Not Found message.

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/api.py:80: RuntimeWarning: coroutine 'ClientSession.close' was never awaited
  self._session.close()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/cli.py", line 54, in main
    returncode = loop.run_until_complete(command(args))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/cli.py", line 210, in connect
    output = await asyncio.gather(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/decorator.py", line 221, in fun
    return await caller(func, *(extras + args), **kw)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/_utils.py", line 105, in _memoized
    cache[key] = await func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/api.py", line 170, in dns_servers
    return await self._get_json('dns/smart')
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/api.py", line 91, in _get_json
    async with self._session.get(url, headers=self.headers) as resp:
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 640, in _request
    resp.raise_for_status()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://api.nordvpn.com/dns/smart')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/nord", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/cli.py", line 61, in main
    remaining_tasks = cancel_all_tasks()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/nord/cli.py", line 71, in cancel_all_tasks
    remaining_tasks = asyncio.Task.all_tasks()
AttributeError: type object '_asyncio.Task' has no attribute 'all_tasks'

Python 3.10 macOs m1

Dinibewerbig commented 2 years ago

Same happens here on linux. How can I connect to a specific server?