import json
import requests
headers = {
# "Host": "www.dianping.com",
# "Connection": "keep-alive",
# "Accept": "application/json, text/javascript, */*; q=0.01",
# "X-Requested-With": "XMLHttpRequest",
"User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36",
"Referer": "http://www.dianping.com/shop/95950516",
# "Accept-Encoding": "gzip, deflate",
# "Accept-Language": "zh-CN,zh;q=0.9",
"Cookie": "s_ViewType=10; _lxsdk_cuid=16edba95f59c8-0baa6fbe2f116d-651a127e-144000-16edba95f59c8; _lxsdk=16edba95f59c8-0baa6fbe2f116d-651a127e-144000-16edba95f59c8; _hc.v=54851812-f654-3e9e-444a-67726f44b384.1575643341; cy=2; cye=beijing; _lx_utm=utm_source%3DBaidu%26utm_medium%3Dorganic; _lxsdk_s=16f04797ca6-787-eb6-5cd%7C%7C69",
}
url = 'http://www.dianping.com/ajax/json/shopDynamic/shopAside?shopId=95950516'
res = requests.get(url=url, headers=headers).text
res = json.loads(res)
glat = res['shop']['glat']
glng = res['shop']['glng']
print(glat,glng)