Extract Stores from Store Locators

ilia.uk at gmail.com ilia.uk at gmail.com
Tue Jun 23 06:11:08 EDT 2015


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'])



More information about the Python-list mailing list