morristech
4/30/2018 - 8:44 PM

download json/parse/download images with python

download json/parse/download images with python

import json
import urllib.request

url = "content.json"

with open(url, 'r') as f:
    content = json.load(f)

print(content['pages'])


imgUrl = "https://xozbfrassets.blob.core.windows.net/assets/default/0001/01/419337a879b3a2a3d5a52923269003ef953db3db.png"
urllib.request.urlretrieve(imgUrl, "419337a879b3a2a3d5a52923269003ef953db3db.png")