Skip to content

Commit

Permalink
Fix yql#447 (yahoo.finance.keystats scraper)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmwilson82 committed Apr 14, 2015
1 parent 0aff544 commit e50ccc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yahoo/finance/yahoo.finance.keystats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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']"
);
Expand All @@ -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());
Expand All @@ -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();
Expand Down

0 comments on commit e50ccc0

Please sign in to comment.