SO - retrieving HTML using YQL

http://stackoverflow.com/questions/8421801/cannot-fetch-data-from-json-request-although-i-know-its-returned/8421896#8421896

HTML

<script src="https://raw.github.com/padolsey/jQuery-Plugins/master/cross-domain-ajax/jquery.xdomainajax.js"></script>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>
<div class="song"><a href=""></a></div>

JavaScript

var artist = "The Tallest Man On Earth";

$.ajax({
    url: 'http://www.songsterr.com/a/wa/search?pattern=' + escape(artist),
    type: 'GET',
    success: function(res) {
        // see http://www.songsterr.com/a/wa/search?pattern=The%20Tallest%20Man%20On%20Earth
        // 1) res.responseText => get HTML of the page
        // 2) get odd anchors inside (it is zero-indexed) => get anchors containing song names
        // 3) map array of anchor elements into only their text => get song names
        var songs = $(res.responseText).find('div.song a:odd').map(function(i, el) { return $(el).text() });
        console.log(songs);
    }
});