Hi Everyone,

I was curious whether there was a way to get a list of all stores from a store 
locator? Currently I am limited to 10 so using requests in python doesn't give 
me much advantage over the web-browser interface:

import requests

url = 
'http://promotions.coral.co.uk/iframes/shop_locator/location-data/getLocations.php'

headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'User-Agent' : 'Mozilla Firefox',
    'Host' : 'promotions.coral.co.uk',
    'Content-Length': '8'
}

payload = {
    'q':'london'
}

ourRequest = requests.post(url, headers = headers, data = payload)
response = ourRequest.json()

for x in response['locations']:
    print(x['address'])
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to