You have 2 small errors in your code: 1- You have forgotten to add the closing </script> just before </body>. Add it there and the callback to your function will work, and you'll see "Yes!" in the first <p>. 2- in: for(var i=0;i<no_items;i++){ var iHref = contents[i].href; var iContent =...

$.getJSON returns an asynchronous result ; where atlatlInfo may not be defined when console.log(atlatlInfo); called ; see How to return the response from an asynchronous call?. Try utilizing success callback of jQuery.getJSON( url [, data ][, success ] ) to process data returned by call to $.getJSON var atlatlInfo =...

The page you're trying to fetch text from actually makes a POST request to another resource to fetch the text via XHR. When you open Firebug or similar, you should see the POST request, its URL and response. It would appear that you need to have a session on the...

Finally I solved the problem. It appears to be the parameter compat="html5". The default html spec is html4. And also I need the xpath parameter to select the <header> content as well as the <body> content. Hope the following code could be of some help to others: function requestCrossDomain(url, cb)...

It looks like set x='y' on uritemplate is not being honored for some reason. In the absence of this, you have the option of having a custom table which accepts a typed parameter say apiKey. You could then have the following: use 'http://location-of-custom-table' as tablename; set apiKey='foo' on tablename; select...

The solution: Ok, so you put your response (respond2) into an NSString. That's quite strange. Let's restart from something that was a NSArray or a NSDictionary: [results2 valueForKeyPath:@"query.results"]: [[[results2 valueForKeyPath:@"query.results"] objectForKey:@"quote"] objectForKey:@"LastTradePriceOnly"]; ...

The /cgi-bin URL is restricted by robots.txt, so YQL will honour that and not crawl the page. You can see this happening by enabling diagnostics for the YQL query. Add diagnostics=true to the YQL URL, like /v1/public/yql?diagnostics=true&callback=? Look for the diagnostics field in the results. This contains information about the...

setInterval(update, 0); You keep spawning Ajax requests as fast as possible. Then you run out of resources (probably before the first request has been handled). Run the update function once, and then call it again (preferably with a setTimeout based delay) from inside the success and error function....

I've solved my question only about the units, Yahoo is not providing rss weather in other language than English-US :-( . This solution avoids to make code for units conversion for distance, speed, temperature and pressure. Check my example query out.

You want to grab them as JSON for easier processing in jQuery. You just need to make sure uppercase JSON is changed to lowercase json to get JSON output from the API. $.getJSON("http://query.yahooapis.com/v1/public/yql?" + "q=select%20*%20from%20html%20where%20url%3D%22" + encodeURIComponent(url) + "%22&format=json&callback=?", ...

OK guys i figured it out, YQL only has ability to scrape html loaded contents, now the contents that are loaded by AJAX like requests, so i had to go with selenium cum phantomJS that has ability to emulate a real browser and navigate to sites and scrape functions. Anyone...

The correct syntax for selecting multiple nodes is | Try this: //div[@class="forecast-element graphic-box"]/img | //div[@class="forecast-element"] As you mentioned, these are two separate query elements. In order to select following elements simply do this //div[@class="forecast-element graphic-box"]/img | //div[@class="forecast-element graphic-box"]/following-sibling::div[@class="forecast-element"] In some xpath parsers, this will also work: //div[@class="forecast-element graphic-box"]/(img|following-sibling::div[@class="forecast-element"]) ...