yahoo finance has inconsistent data?

Hi, I'm coding a website for my school project that uses yahoo finance as a source. I've run into a pretty big problem. For request <http://ichart.finance.yahoo.com/table.csv?s=GANS&a=01&g=v&ignore=.csv> yahoo gives mi different data once a while. I thought there was something wrong with my codes:

        webpage_dividend = urllib.urlopen(url_dividend)
        if webpage_dividend.getcode() != 200: continue
        datareader_dividend = csv.DictReader(webpage_dividend)
        for dividend in datareader_dividend:
            print dividend['Date'], dividend['Dividends']

But then I tried to load url in my browser. I loaded it three times. First two downloads contained: http://pastebin.com/KeN4ESCS third contained: http://pastebin.com/LaH1aBat How is this possible. I'm requesting same data, but every third request gives me different data? Can I somehow bypass this problem?

1 Reply
  • Oh, sorry, I didnt notice it was java development forum when I clicked on ask question.


Recent Posts

in Java Development