Skip to content

Instantly share code, notes, and snippets.

View cforcross's full-sized avatar
:octocat:
working

chowa cross cforcross

:octocat:
working
View GitHub Profile
@cforcross
cforcross / index.py
Last active September 22, 2021 15:46
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")
@cforcross
cforcross / imports.py
Created September 22, 2021 15:25
imports
import requests,json