from urllib.parse import quote
from urllib import request
def get_html(url):
response = request.urlopen(url)
return response.read()
yandex_ru = "https://geocode-maps.yandex.ru/1.x/?format=json&geocode={0}"
get_html(yandex_ru.format(quote("Москва, Сретенка 8"))).decode("utf-8")