From 274c3549b0df87f9446abe739528ac6142df6c64 Mon Sep 17 00:00:00 2001 From: doom99 Date: Fri, 27 Mar 2015 12:07:19 -0400 Subject: [PATCH] Update yahoo.finance.oquote.xml Recent changes to the Yahoo finance quote pages have severely broken a number of datatables, including oquote. The javascript in the above file has been change substantially to again return data. Minor documentation of the changes is included and contextual examples of the prior oquote javascript are kept to provide background for any future modifications. The default ticker is set for an option expiring two years in the future (2017). --- yahoo/finance/oquote/yahoo.finance.oquote.xml | 79 ++++++++++++++----- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/yahoo/finance/oquote/yahoo.finance.oquote.xml b/yahoo/finance/oquote/yahoo.finance.oquote.xml index 4bca168c..e0f17815 100644 --- a/yahoo/finance/oquote/yahoo.finance.oquote.xml +++ b/yahoo/finance/oquote/yahoo.finance.oquote.xml @@ -2,13 +2,13 @@ - Prem Ramanathan + Mike Miskulin 3/27/15 Yahoo Finance Option Quotes - SELECT * FROM {table} WHERE symbol='MSFT130125C00026000' + SELECT * FROM {table} WHERE symbol='MSFT170120C00045000' @@ -21,18 +21,39 @@ - {price}); quote.appendChild({change}); - quote.appendChild({quoteList.tr[0].td.p.text()}); - quote.appendChild({quoteList.tr[1].td.p.text()}); - quote.appendChild({quoteList.tr[2].td.span.text()}); - quote.appendChild({quoteList.tr[3].td.span.text()}); - quote.appendChild({quoteList.tr[4].td.p.text()}); - quote.appendChild({quoteList.tr[5].td.p.text()}); - // quote.appendChild({quoteList.tr[6].td.p.text()}); - // quote.appendChild({quoteList.tr[7].td.p.text()}); - quote.appendChild({quoteList.tr[8].td.span.text()}); - quote.appendChild({quoteList.tr[9].td.p.text()}); - response.object = quote; -} + // For future debugging/modification, prior to this revision the + // general format of these statements were as below: + // quote.appendChild({quoteList.tr[1].td.p.text()}); + // quote.appendChild({quoteList.tr[2].td.span.text()}); + quote.appendChild({quoteList[0].text()}); + quote.appendChild({quoteList[1].text()}); + quote.appendChild({quoteList[2].span.text()}); + quote.appendChild({quoteList[3].span.text()}); + quote.appendChild({quoteList[4].text()}); + quote.appendChild({quoteList[5].text()}); + // the two lines below have NOT been used in a very long time and should + // be considered DEPRECATED. You will likely break someone else's scripts + // if you enable them in the future. If you need them, self host the oquote.xml + // + // quote.appendChild({quoteList.tr[6].td.p.text()}); + // quote.appendChild({quoteList.tr[7].td.p.text()}); + quote.appendChild({quoteList[8].span.text()}); + quote.appendChild({quoteList[9].text()}); + + + response.object = quote; + + // if you need to debug, the below gives back whatever is being + // returned for the quoteList object + // response.object=quoteList; + +} ]]> @@ -67,3 +103,4 @@ if (summary.hasComplexContent()) {
+