YQL (IITK PPT)
-
Upload
markandey -
Category
Technology
-
view
592 -
download
1
Transcript of YQL (IITK PPT)
YQL
Markandey Singh
(HackU IIT Kanpur)
Hello
I am
Markandey
I am
{Markandey}
Yahoo Query Language
YQL is not a
language
The YQL Web Service enables applications to query, filter, and combine data from different sources
across the Internet.
This is YQL Console
YQL is not a language
URL output
http://query.yahooapis.com/{query}
<xml>
</xml
{‘json’:’json’
}
Lets see with example
select * from flickr.photos.interestingness
Here is the code
JSON
{“name”: “markandey”}
JSON with callback
foo ({“name”: “markandey”});
This is what you get
http://bit.ly/yqlflickr
Page Scraping
select * from html where url=“------" and
xpath=“--------”;
Faculty at IIT Kanpur
select * from html where url=“http://www.cse.iitk.ac.in/peopl
e/faculty.html" andxpath=“……..”;
URL
select * from html where url=“http://www.cse.iitk.ac.in/peopl
e/faculty.html" andxpath=“//div[@id="permanent-
faculty"]/ul//a”;
XPATH
This is what You get
http://bit.ly/iitkfaculty
ChromYQLipchromy-clip
Content Analysis with YQL
http://bit.ly/yqlcap
One catch with CAP
One catch with CAP
URL length is limited , so you have to switch back to POST, method on YQL.
iTunes Store Top 10 Songs
iTunes Store Top 10 Songs
Youtube search
Language sugar: randomize
Some more???
Some more???
Lets see some more hacks
Picture me
http://bit.ly/pikme
What else YQL can do????
You can create your own table
Read more bit.ly/yqlODT
My random hello!! table
You can store
secrets on YQL
Twitter oauth
38
SELECT * FROM twitter.STATUS.timeline.friendsWHERE oauth_consumer_key = '9DiJt6Faw0Dyr61tVOATA'AND oauth_consumer_secret = 'XBF9j0B2SZAOWg44QTu6fCwYy5JtivoNNpvJMs6cA'AND oauth_token = '18342542-NkgUoRinvdJVILEwCUQJ3sL2CIm2ZwzS5jjj2Lg7y'AND oauth_token_secret = 'D6ewAzsueTzQmrAJGFH0phV5zgWT88FOtcMeqW4YeI';
YQL
Local storage
oauth_token
oauth_token
oauth_consumer_key
oauth_consumer_secret
Read more here
http://bit.ly/yqloauth
More Hacks example here
http://www.purplegene.com/http://bit.ly/markhack
Siri vs fake
Reach me
@markandey