Skip to content

Instantly share code, notes, and snippets.

@hmharshit
Created February 27, 2020 13:49
Show Gist options
  • Save hmharshit/ce314915e43d35adaa9468e8e8c52739 to your computer and use it in GitHub Desktop.
Save hmharshit/ce314915e43d35adaa9468e8e8c52739 to your computer and use it in GitHub Desktop.
import requests
def run():
print(requests.get("https://www.nseindia.com/api/equity-stockIndices?index=NIFTY%2050",
headers={
"user-agent": "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
}).json())
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment