Skip to content

Instantly share code, notes, and snippets.

@anthonysterling
Created September 4, 2012 20:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonysterling/3626248 to your computer and use it in GitHub Desktop.
Save anthonysterling/3626248 to your computer and use it in GitHub Desktop.
Simple Tunlr.net YQL Data Table
<?xml version="1.0" encoding="UTF-8" ?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<description>Retrieves the IP adddresses for tunlr.net's DNS servers</description>
<author>Anthony Sterling</author>
</meta>
<bindings>
<select produces="JSON">
<execute><![CDATA[
var results = y.query("select content from html where url=\"http://tunlr.net/get-started/\" and xpath='//span[@style = \"font-size: xx-large;\"]'").results.*;
var addresses = [];
for each (var address in results) addresses.push(address.toString());
response.object = {ip: addresses};
]]></execute>
</select>
</bindings>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment