kboghe / NordVPN-switcher

Rotate between different NordVPN servers with ease. Works both on Linux and Windows without any required changes to your code!
https://pypi.org/project/nordvpn-switcher/
189 stars 51 forks source link

NordVPN API Deprecation and Update Required #57

Open Sebastian7700 opened 3 months ago

Sebastian7700 commented 3 months ago

Issue: The old NordVPN API endpoint https://nordvpn.com/api/server has been deprecated and now returns {"status": "deprecated"}. As a result, the program is currently not functioning properly.

New API: NordVPN has introduced a new API endpoint: https://api.nordvpn.com/v1/servers. However, the JSON output from this endpoint appears to be different from the previous one, and simply changing the endpoint does not make the script functional.

Additional Endpoints: Other potentially useful endpoints include:

https://api.nordvpn.com/v1/servers/recommendations https://api.nordvpn.com/v1/servers/countries https://api.nordvpn.com/v1/helpers/ips/insights

Attributes: By default, these endpoints will only return 100 entries. To retrieve more entries, you can use the limit attribute. For example: https://api.nordvpn.com/v1/servers?limit=1000 There is also a filters attribute, but I'm unsure about how it works. There might be information available online.

Personal Request: If you get the time to update this repository, that would be awesome. It would be greatly appreciated. Thanks in advance for your help!

ualers commented 3 months ago

I'm not the owner of the repository but I'm a python programmer too, I'm going to try to solve this problem in the api, this repository is incredible I'm using it every day I can't be without it

ualers commented 3 months ago

good news :} ! I managed to solve the deprecated api problem using the new API you provided: https://api.nordvpn.com/v1/servers

As you said, the output of this new endpoint is different, I solved it with the help of Chatgpt, I preferred to use its help for speed reasons alone it would take a few days solo

I created a request pool

If you need it urgently, just go to my profile and download the fork called NordVPN-switcher_teste

Sebastian7700 commented 3 months ago

That's awesome, thanks mate! I also use the repository quite regularly. I will check it out later.

kboghe commented 3 months ago

Sorry fellas, I'll try and update the package during the weekend! Thanks for providing the solution; this saves me some time. Again: I'm terribly sorry for the delay...

ualers commented 3 months ago

Isso é incrível, obrigado, cara! Eu também uso o repositório com bastante regularidade. Vou verificar mais tarde.

You're welcome, but there's no need to say thank you, we're together s2 :}

ualers commented 3 months ago

Desculpe pessoal, vou tentar atualizar o pacote durante o fim de semana! Obrigado por fornecer a solução; isso me poupa algum tempo. Mais uma vez: sinto muito pela demora...

Thank you very much, we are looking forward to this fix, no need to thank us, I appreciate this package is amazing :}, don't worry, we understand s2 :}