I experienced the same problem -- working fine around 2am GMT - hopefully it can be addressed in the near future
(does this service often fall over ? - I'm pretty new to the yahoo.finance.* services via yql )
This requires urgent attention from Yahoo. I am not certain what is going on. Tables that use download.finance.yahoo.com seem unaffected. Those that use finance.yahoo.com are all bombing. I am seeing this in diagnostics too:
I think this may not be a problem with the tables (query xml) itself but something Yahoo has done on the front end
There is a yql dev console where you can paste that XML and run it. Yesterday I experimented with it, but it seems that their API for parsing HTML pages is throwing exceptions when trying to parse the yahoo finance pages. I am not sure there is something that can be done here. They should fix their page or their API :(
Thanks very much for your efforts. I apologize if these are noob questions, but what exactly are you trying to fix? The XML table generated by the YQL API? Are you writing html code to parse the source into an XML? Will you then submit it to YQL, so they can run it whenever someone wants the XML? If you fix the Stock table, can we take your code and apply it to the other YQL Finance tables?
The yahoo.finance tables are not official Yahoo YQL tables. They were created by 3rd parties or were intended as examples. They are also rate limited by the finance site or are occasionally blocked. Also, Yahoo finance data is not approved for commercial usage via YQL.
The YQL Service can be used for commercial purposes without prior approval from Yahoo. Developers using the YQL Service fetching data from a content provider need to conform to the Terms of Service of the content provider. Please note that data available on the Yahoo! network (e.g., Finance, Weather) is not approved for commercial usage via YQL, unless mentioned otherwise in the Terms of Service.
It is great that you submitted a pull request and this is going to be very helpful when fixing the other tables, but can you please reformat the indentation to match the one in the master branch, because right now it is not visible what you actually changed. It seems that all the lines in the file changed, which is not very helpful.
BTW, at this point we just moved away from YQL... However I think this is a nice technology and I may reconsider using it if I have more knowledge how to handle situations like this. In this particular case I am curious how you managed to fix the HTML parsing, as it looked to me as an internal API issue.
The key fix I put in the table is adding "compat=html5" condition while querying the html content, it got rid of the error about "The content of elements must consist of well-formed character data or markup." But because of this, the result HTML content has different xpath than before, so I had to adjust the xpath and the html parsing function as well. In addition to these, I also added more stock summary data to the result so it does has quite a few changes.
I tweeted @Yahoocare about the YQL finance tables and got back the following:
Yahoo Finance doesn't own or provide any support for community-created tables, sorry. Yahoo Finance doesn't provide any official API's to the developers except for the ticker based RSS feeds: https://developer.yahoo.com/finance/
Thanks again for your time in figuring out the issues with the stocks table. I looked at your code and used the syntax below in the YQL console. It returned a disjointed XML type file. Is there some way to modify the query, so I get the well formed XML that you show above?
select * from html where url='http://finance.yahoo.com/q?s=goog' and xpath='//div[@id="yfi_investing_head"]/h1 | //div[@class="yfi_quote_summary"]/div' and compat="html5"
Seems to me that whoever maintains these "community tables" made a change. So, the obvious question is who maintains these tables...and, what was changed. Maybe it's time to change to Microsoft or Google...
So...further research indicates that perhaps Yahoo has modified the data from which these queries obtain data? I've tried several of the examples and they don't work either. Some YQL table info is on Github and it appears that nothing has changed recently. For example the "options_contracts" table info has the name: Alan Verga associated with it. It appears as he is the author of the code that builds the table itself from the Yahoo data? I can't find an email address for him, so can't go further with this. It may be that since Yahoo isn't doing so well, perhaps it's trying to shut down these types of queries and force people to their website where they can be subjected to advertising? :-)