Skip to content

Instantly share code, notes, and snippets.

@Varad2305
Created January 20, 2022 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Varad2305/f69bb6ef63fc04ee0d5bbe10104114b3 to your computer and use it in GitHub Desktop.
Save Varad2305/f69bb6ef63fc04ee0d5bbe10104114b3 to your computer and use it in GitHub Desktop.
import subprocess
import os
subprocess.Popen('curl "https://www.nseindia.com/api/quote-derivative?symbol=BANKNIFTY" -H "authority: beta.nseindia.com" -H "cache-control: max-age=0" -H "dnt: 1" -H "upgrade-insecure-requests: 1" -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" -H "sec-fetch-user: ?1" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-site: none" -H "sec-fetch-mode: navigate" -H "accept-encoding: gzip, deflate, br" -H "accept-language: en-US,en;q=0.9,hi;q=0.8" --compressed -o maxpain.txt', shell=True)
f=open("maxpain.txt","r")
var=f.read()
print(var)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment