import json from collections import Counter SAS = "sp=racwdli&st=2023-09-17T15:37:58Z&se=2023-12-31T23:37:58Z&spr=https&sv=2022-11-02&sr=c&sig=u%2FPbZ4fNttAPeLj0NEEpX0eIgFcjhot%2Bmy3iGd%2BCmxk%3D" # e.g sp=r&st=... with open("sample_cdfs.json", "r") as f: data = [] for line in f: data.append(json.load(f)) print(""" """) for index, item in enumerate(data): # NOTE: replace xxxxxxxxx with SAS! file = f"https://internblob.blob.core.windows.net/v-lixinyang/canva-render-11.30/{item['rendered_folder']}-()?{SAS}" if index % 1 == 0: print('
') print(f"""
image
image
image
image
""") if index % 1 == 0: print('
') print(f"""

Index: {index}
Category: {item["category"]}
{item["caption"]}
Tags: {item["tags"]}
Texts: {item["texts"]}

""") print(""" """)