import wget, urllib ### Say hi, collect the variables needed to create custom OSM Overpass Turbo URLS msg = "Welcome to PlaceNearPlace by CharlesWhiteCat" print(msg) ### FIX NEEDED - Add in other country lookups SearchLocation = input("What country would you like to search in? Right now I only search United Kingdom lol:") SearchDistance = input("What is your maximum search distance in meters? :") Place1 = input("What is your first place to search? :") Place2 = input("What is your second place to search? :") Place3 = input("What is your third place to search? :") ### Construct URLS from the Place1, Place2, Place3 Variables OsmUrl1 = "https://overpass-api.de/api/interpreter?data=[out:json][timeout:2500];area(3600062149)->.searchArea;(node[name~"+Place1+"](area.searchArea);way[name~"+Place1+"](area.searchArea););out body;>;out skel qt;" ### Encode URL with urllib NiceUrl1 = urllib.parse(OsmUrl1) ### Wget the data as JSON Place1.json = wget.download(CodedUrl1)