BingFetch.py
import json
from pprint import pprint
import os
from urllib import request, error

raw = open('images.json')
data = json.load(raw)
raw.close()

for res in data['resolutions']:
    if not os.path.exists(res):
        os.mkdir(res)

for image in data['imageNames']:
    retrieved = False
    for res in data['resolutions']:
        if retrieved:
            break

        localpath = '%s/%s_%s.jpg' % (res, image, res)

        for cdn in data['cdns']:
            if retrieved:
                break

            url = '%s%s_%s.jpg' % (cdn, image, res)
            print('Downloading file %s... ' % url, end='')

            try:
                response = request.urlretrieve(url, localpath)

                retrieved = True
                print('Ok!')
            except error.URLError:
                print('Failed!')