Home > Back-end >  Unable to access link from India in selenium python
Unable to access link from India in selenium python

Time:12-18

I am trying to access a website using automation in python but that will work only from India. But I am unable to do so.

The current code with the website link is as follows:

from selenium import webdriver

driver = webdriver.Chrome()

r = driver.get("https://visa.vfsglobal.com/ind/en/pol/")

time.sleep(15)

Although i have used selenium for automation but it is not necessary. Any other alternative library or anything will work too. Help me out.

CodePudding user response:

I could doing that without any problems.
I'm not from India.
This is my code:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument("start-maximized")

webdriver_service = Service('C:\webdrivers\chromedriver.exe')
driver = webdriver.Chrome(options=options, service=webdriver_service)

url = "https://visa.vfsglobal.com/ind/en/pol/"
driver.get(url)

The result is:

enter image description here

  • Related