yash12392 / tradewithpython-blogs Goto Github PK
View Code? Open in Web Editor NEWRepo for storing all blogs written on https://tradewithpython.com/
Repo for storing all blogs written on https://tradewithpython.com/
I get error while downloading 2015 data.. It says "File is not a zip file". I believe you can also add some conditions to get rid of this issue.
I am using pretty much the same code that you had provided in your blog.
from random import randint
import time
from jugaad_data.nse import full_bhavcopy_save
date_range = pd.bdate_range(start='02/01/2015', end = '12/28/2015',
freq='C', holidays = holidays(2015))
dates_2020 = [x.date() for x in date_range]
error_dates = []
for dates in dates_2020:
year = dates.year
print(year,'- ',dates)
try:
bhavcopy_save(dates, """to_path\\{0}\\""".format(year))
# full_bhavcopy_save(dates, """to_path\\{0}\\""".format(year))
time.sleep(randint(1,4)) #adding random delay of 1-4 seconds
except Exception as e:
print('Error - ',e)
print('Error - 10 sec gap')
time.sleep(10) #stop program for 10 seconds and try again.
error_dates.append(dates)
print(error_dates)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.