title: What is the trick to Scrape the NSE page?
body: <p>Basically, I am trying to <strong>scrape</strong> this link <code>https://www.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?segmentLink=17&amp;instrument=OPTIDX&amp;symbol=BANKNIFTY</code></p>
  <p>This following code is the solution -</p>
  <pre><code>import requests
  headers = {
      'Connection': 'keep-alive',
      'Cache-Control': 'max-age=0',
      'DNT': '1',
      'Upgrade-Insecure-Requests': '1',
      'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36',
      'Sec-Fetch-User': '?1',
      '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',
      'Sec-Fetch-Site': 'none',
      'Sec-Fetch-Mode': 'navigate',
      'Accept-Encoding': 'gzip, deflate, br',
      'Accept-Language': 'en-US,en;q=0.9,hi;q=0.8',
  }
  
  response = requests.get('https://www1.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?segmentLink=17&amp;instrument=OPTIDX&amp;symbol=NIFTY', headers=headers, verify=True,timeout=(5, 14))
  print(response.content)
  </code></pre>
  <p>It works perfectly on my laptop but it is not working on Google Collab or Heroku server or digital ocean as well as in motion hosting.</p>
  <p><strong>What is the catch here?</strong></p>