Nord VPN – Python location switcher

The following script will take a specified location as input and then attempt to connect to a Nord VPN server in the location entered. The prerequisite of this script is Nord VPN must be installed on your machine; the script will check your machine automatically for the Nord program files. This script is especially ideal for those scraping online and I anticipate going in to this further.

from nordvpn_connect import initialize_vpn, rotate_VPN, close_vpn_connection

while 1==1:
    Location = input("Enter desired Location:  ")
    settings = initialize_vpn(Location)  
    rotate_VPN(settings)
    #Start Scraping etc etc
    close_vpn_connection(settings)

Leave a Reply