GNOME Bugzilla – Bug 123125
replace quotes html source by CSV file source
Last modified: 2004-12-22 21:47:04 UTC
Yahoo gives a feature offering a CSV file for fetching quotes. As gtik rely on a low quality "parser" for extracting quotes from html pages a simple layout of font change could broke gtik (this already occurs several times). To avoid this, relying on CSV for fetching quotes hardened gtik but more, also reduce parsing CPU/memory needs. The patch attached were generated against CVS head (gnome-applets 2.4.0).
Created attachment 20248 [details] [review] patch using CSV file for fetching quotes from yahoo (against CVS HEAD/gnome-applets 2.4.0)
We also should consider that NASDAQ provides an xml feed for stocks at http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=rhat One problem I see is that you can't seem to get mutual fund data. Also we need to think about legality issues with Yahoo and other places.
I had a look at the feed. It is a good source but I tried to fetch indices and didn't succeed (ex. ^ixic returns invalid symbol). I might have miss it, nevertheless it will implie a change in indices naming (imcompatibility). About the license problem the fetched xml file contains a license (the yahoo CSV file do not contains anything but the data). I don't know a lot about these legal issues, but the license contains explicit interdiction to copy, reproduce, transmit, display, perform, distributes .... etc. Is it a problem ? here is it: Copyright The works of authorship contained in this world wide website in the domain "www.NASDAQ.com" (the "NASDAQ Site"), including but not limited to all design, text and images, are owned, except as otherwise expressly stated, by The Nasdaq Stock Market, Inc. or one of its affiliates, the National Association of Securities Dealers, Inc., NASD Regulation, Inc., NASDAQ International Marketing Initiatives, or NASDAQ International, and may not be copied, reproduced, transmitted, displayed, performed, distributed, rented, sublicensed, altered, stored for subsequent use or otherwise used in whole or in part in any manner without the prior written consent of The Nasdaq Stock Market, Inc., except to the extent that such use constitutes "fair use" under the Copyright Act of 1976 (17 U.S.C. 107), as amended, and except for one temporary copy in a single computer's memory and one unaltered permanent copy to be used by the viewer for personal and non-commercial use only, with an attached copy of this page containing NASDAQ's Disclaimer, Copyright and Trademark Notices. Unless you have a NASDAQ Logo License or other written agreement in effect with The Nasdaq Stock Market, Inc. which states otherwise, you may only provide a hypertext link to the NASDAQ Site on another website, provided that (a) the link must be a text-only link clearly marked "NASDAQ Home Page" or "NASDAQ.com", (b) the link must "point" to the URL "http://www.NASDAQ.com" and not to other pages within the NASDAQ Site, (c) the appearance, position and other aspects of the link may not be such as to damage or dilute the goodwill associated with NASDAQ's name and trademarks, (d) the appearance, position and other aspects of the link may not create the false appearance that an entity is associated with or sponsored by NASDAQ, (e) the link, when activated by a user, must display the NASDAQ Site full-screen and not within a "frame" on the linked website, and (f) The Nasdaq Stock Market, Inc. reserves the right to revoke its consent to the link at any time in its sole discretion.
There is another thing I think about nasdaq source. With yahoo we can easily access international quotes (I'am in France and lookup for Paris market) by suffixing the symbol name with market initials (for ex. PA for Paris). Will it be possible to have something similar with NASDAQ source.
I've applied this patch and it seems to work well. gtik stopped working a week or two ago (near the beginning of Feb 2004.) This patch fixed it. Any plans to put it into CVS? Without this or a similar patch gtik is currently not working.
Appllied. Thanks Remi for doing this.
Welcome. A pleasure ;-)