Created
September 4, 2012 20:44
-
-
Save anthonysterling/3626248 to your computer and use it in GitHub Desktop.
Simple Tunlr.net YQL Data Table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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