Last active
September 22, 2021 15:46
-
-
Save cforcross/07a472973d42271ea105cc948790d16f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests,json | |
def index(request): | |
url ="https://min-api.cryptocompare.com/data/v2/news/?lang=EN" | |
res = requests.get(url) | |
if res.status_code == 200: | |
result = json.loads(res.content) | |
return render(request, 'index.html',{"result": result}) | |
else: | |
print(f"{url} not valid") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment