-1

Let me ask very short comparative past questions.

I got the result from YQL CONSOLE not my terminal.

Below is my code.

new YQL.exec('select * from html where url="http://fortune.daum.net/external/4/run/star_free/index.php" and xpath="//td[contains(@style,"font-family:굴림; font-size:12px; color:#333333; line-height:18px; padding-right:10px")]/"', function(response) {

console.log(response);
//response consists of JSON that you can parse
if (response.error) {
    console.log('error');
}
else {
    //var location  = response.query.results.result;
    var location  = response.query.results.result;
    console.log(location);
}

});
halfer
  • 19,824
  • 17
  • 99
  • 186
LKM
  • 2,410
  • 9
  • 28
  • 53

1 Answers1

1

It seems that you have mistaken multi-level quote marks, try below:

new YQL.exec('select * from html where url="http://fortune.daum.net/external/4/run/star_free/index.php" and xpath="//td[contains(@style,\'font-family:굴림; font-size:12px; color:#333333; line-height:18px; padding-right:10px\')]"')
Feng Dihai
  • 416
  • 3
  • 9