I am trying to extract the coordinates e. g. longitude and latitude of the pointer on a map depicted on a static google maps image from a house listing.
Is it possible? There is also a static google maps image of the location attached below.
What is the best way to do this?
I've tried to find the location in the metadata, but there was none.
import exifread
def check_exif(image_path):
with open(image_path, 'rb') as f:
tags = exifread.process_file(f)
if not tags:
print("No EXIF metadata found.")
else:
print("EXIF metadata keys:", tags.keys())
check_exif("image.jpg")
Open map, get the page source and search for this regex
:
"latitude\\":(-?\d+\.\d+),\\"longitude\\":(-?\d+\.\d+)
Extract numbers and you have your coordinates.