I wish to retrieve the Google Maps URL present inside the iframe element of a webpage https://villageinfo.in/andaman-&-nicobar-islands/nicobars/car-nicobar/arong.html.
Below is the sample url which I need from the iframe element. https://maps.google.com/maps?ll=9.161616,92.751558&z=18&t=h&hl=en-GB&gl=US&mapclient=embed&q=Arong%20Andaman%20and%20Nicobar%20Islands%20744301
I am unable to retrieve URL when I performed below steps. Page has only 1 iframe element.
iframe = driver.find_element_by_tag_name('iframe')
driver.switch_to.frame(iframe)
I even tried to retrieve all urls inside the element, but it gave Google Ads URLs apart from the one I require.
urls = driver.find_elements(By.TAG_NAME, 'a')
for url in urls:
print(url.get_attribute('href'))
What should be the approach or methodology here to be tried?
Thanks in advance.