Untitled
unknown
plain_text
3 years ago
710 B
4
Indexable
import json import time import requests header = {"X-CMC_PRO_API_KEY": "ce4e2e17-cb37-4cf4-9aeb-3e4b5748d8ca", "Accept": "application/json"} response = requests.get("https://pro-api.coinmarketcap.com/v1/cryptocurrency/map", headers=header) response_json = json.loads(response.text) for i in response_json["data"]: response = requests.get(f" https://pro-api.coinmarketcap.com/v2/cryptocurrency/info?id={i['id']}", headers=header) response_json = json.loads(response.text) try: with open("domains_parse.txt", mode="a") as file: file.write(response_json['data'][str(i['id'])]['urls']["website"][0].replace("https://","")+"\n") except Exception: pass time.sleep(288)
Editor is loading...