They are free to file legal suit lol on a small retailer like me .
I tried with curl… But seems they blocked that also…
From Friday yes. Now two methods work -
Just get the cookies from Curl session
Json Token using Python
I will update later.
did you try with https://alternativeto.net/software/httpie/about/
I have really no clue what is it
Hope you are doing well.
Thanks for this wonderful library but I need some help with this. I am able to access it from a local machine but from amazon AWS (AWS Linux/RHEL) servers, I am getting the timeout exception.
Please help me out. Thanks in advance.
It is not a problem of Python Request. Nse’s robots.txt has blocked all webservers all together. See here
User-agent: * Disallow: /static/htmls/ Disallow: /static/src/ Disallow: /server/ Disallow: /api/ Sitemap: https://www.nseindia.com/sitemap.xml Sitemap: https://www.nseindia.com/sitemap-stocks.xml
You can use the curl method and initiate shell commands using Python if you want to do it.
Thanks for your Youtube videos I was able to code my Trading setup.
Also deployed on AWS but getting timeout error as mentioned
Can you please guide on how to fetch data by curl method? or suggest some alternative.
I am new to coding field
You don’t need to be master of anything. Google away
… How to use Python to execute a cURL command? - Stack Overflow
Amazing library and I am using it for my Option Strategy analysis.
But doesn’t work on a server.
Have you got time to work on the CURL option yet?
Can you let me know how it is done, if you dont’ have time to modify the library?
Daughter disrupting my timeline.
I do not plan to add Curl Method in the library unless I see some other library doing it. It is because - That will increase the load in NSE servers and they will guard up their firewalls causing lots of problems for general scavengers like us like they did with their old website.
OK. Thank you. Looking forward to it.
Your code is working great on local environment. But it is not working on Google cloud functions even with the same code.
Can you please help? I’m getting timeout exception. I’ve tried with NodeJs api as well. I can post both code if you want.
Thanks in advance!
While working google colab, it throws the following error:
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.nseindia.com:443
Can anyone please help?
It does not allow.
If I make NSEPython compatible for servers, it will not work in windows laptops.
If I make NSEPython compatible for laptops, it will not work in server.
Now, tell me how I will solve this.
If I am not wrong request package lets you set useragent in the header write?
So basically can’t we bypas that robot block by setting useragent to something like webkit or something
Here is a hint
Use subprocess and curl
Now, this is the major update. Added a new library named “nsepythonserver” that will allow you to run nsepython library from Google Collab and other servers.
nsepythonserver instead of
!pip install nsepythonserver
Will update more in documentation soon.
could you please address this:
New nsepythonserver not fetching option chain data. Will using a ROTATING PROXY be a good option to integrate with nsepythonserver? (nsepythonserver error)