From e50ccc07980c7697be987e37a331af253b032a64 Mon Sep 17 00:00:00 2001 From: John Wilson Date: Tue, 14 Apr 2015 21:00:37 +0100 Subject: [PATCH] Fix #447 (yahoo.finance.keystats scraper) --- yahoo/finance/yahoo.finance.keystats.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yahoo/finance/yahoo.finance.keystats.xml b/yahoo/finance/yahoo.finance.keystats.xml index 69fb91cd..f5ab98bf 100644 --- a/yahoo/finance/yahoo.finance.keystats.xml +++ b/yahoo/finance/yahoo.finance.keystats.xml @@ -68,7 +68,7 @@ var rawresult = restquery.accept( "text/html" ).get().response; var keystatsquery = y.xpath( rawresult, - "//table[@class='yfnc_datamodoutline1']/tr/td/table/tr" + + "//table[@class='yfnc_datamodoutline1']/tbody/tr/td/table/tbody/tr" + "/td[@class='yfnc_tabledata1' or @class='yfnc_tablehead1']" ); @@ -90,7 +90,7 @@ i = i + 2; // Process Parameter Name and any Associated Attributes (Timeframe, Stock Split Info) - param_name = td_param_name.p.text().toString(); + param_name = td_param_name.text().toString(); param_name = String(param_name.replace(/:/g,"")); attr = String(param_name.match(/\(.*\)/)); attr = String(attr.trim()); @@ -105,7 +105,7 @@ param_name = param_name.trim(); // Process Value Information - value = td_value.p.text().toString(); + value = td_value.text().toString(); // Catch When it is Span Tag instead of P tag if( value == false){ value = td_value.span.text().toString();