import json with open('json/proxies.json') as f: x = json.load(f) text = "" for i in x["cards"]: text += f"""
" with open('_site/proxies/index.html') as f: y = f.read() y = y.replace('', text) with open('_site/proxies/index.html', 'w') as f: f.write(y)