Search code examples
javascriptjqueryyql

YQL and javascript (failed)


I found a trickshot

// Define variables
var query = 'select * from data.html.cssselect where url="http://www.chucknorrisfacts.com/chuck-norris-top-50-facts" and css=".field-content a"';
var yqlAPI = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent(query) + ' &format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=?';
$.getJSON(yqlAPI, function(r){
    console.log('Chuck Norris Facts:');
$.each(r.query.results.results.a, function(){ console.log('----------'); console.log(this.content);
}); }); 

Sound great but it doesn't work.

Found this : http://tutorialzine.com/2010/02/feed-widget-jquery-css-yql/ same problem. https://github.com/hail2u/jquery.query-yql download, unzip, run on a server and nothing.

YQL console with the first query is slow but works.

How can I use YQL with js ? Does OAuth necessary ?

update : screenshot with console


Solution

  • Apologies, I found the answer… this is not YAHOO but my local network and his gateway (modem).

    I make a succesfull test using a Tethering conection. So I go to my gateway admin page.


    Firewall

    Web Content Filter : This page allows certain Web-oriented cookies, java scripts, and pop-up windows to be blocked by the firewall. A list of "trusted computers" can also be defined that are not subject to any filters configured. Specific Firewall features can also be enabled. It is highly recommended that the Firewall is left enabled at all times for protection against Denial of Service attacks. Go to the Parental Control page to block internet access to specific sites.

    Web Features

    • Filter Proxy uncheck
    • Filter Cookies uncheck
    • Filter Java Applets uncheck
    • Filter ActiveX uncheck
    • Filter Popup Windows uncheck
    • Block Fragmented IP Packets uncheck
    • Port Scan Detection uncheck
    • IP Flood Detection uncheck
    • Firewall Protection > was checked

    Unchecked the last item and now it's work ! I never had any problems with this firewall, using ajax, nas config, dlna protocol, running a mysql on local server…

    To be more specific, this is a Thomson twg850-4 (rented by my ISP).