Code Monkey home page Code Monkey logo

tradewithpython-blogs's People

Contributors

inder-pal-singh avatar shreyans145 avatar utkarsh060 avatar yash12392 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tradewithpython-blogs's Issues

2015 Data Download Issue

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.