YQL (IITK PPT)

42
YQL Markandey Singh (HackU IIT Kanpur)

Transcript of YQL (IITK PPT)

Page 1: YQL (IITK PPT)

YQL

Markandey Singh

(HackU IIT Kanpur)

Page 2: YQL (IITK PPT)

Hello

Page 3: YQL (IITK PPT)

I am

Markandey

Page 4: YQL (IITK PPT)

I am

{Markandey}

Page 5: YQL (IITK PPT)

Yahoo Query Language

Page 6: YQL (IITK PPT)

YQL is not a

language

Page 7: YQL (IITK PPT)

The YQL Web Service enables applications to query, filter, and combine data from different sources

across the Internet.

Page 8: YQL (IITK PPT)

This is YQL Console

YQL is not a language

Page 9: YQL (IITK PPT)
Page 10: YQL (IITK PPT)

URL output

http://query.yahooapis.com/{query}

<xml>

</xml

{‘json’:’json’

}

Page 11: YQL (IITK PPT)

Lets see with example

Page 12: YQL (IITK PPT)

select * from flickr.photos.interestingness

Page 13: YQL (IITK PPT)

Here is the code

Page 14: YQL (IITK PPT)

JSON

{“name”: “markandey”}

Page 15: YQL (IITK PPT)

JSON with callback

foo ({“name”: “markandey”});

Page 16: YQL (IITK PPT)

This is what you get

http://bit.ly/yqlflickr

Page 17: YQL (IITK PPT)

Page Scraping

select * from html where url=“------" and

xpath=“--------”;

Page 18: YQL (IITK PPT)

Faculty at IIT Kanpur

Page 19: YQL (IITK PPT)

select * from html where url=“http://www.cse.iitk.ac.in/peopl

e/faculty.html" andxpath=“……..”;

URL

Page 20: YQL (IITK PPT)

select * from html where url=“http://www.cse.iitk.ac.in/peopl

e/faculty.html" andxpath=“//div[@id="permanent-

faculty"]/ul//a”;

XPATH

Page 21: YQL (IITK PPT)

This is what You get

http://bit.ly/iitkfaculty

Page 22: YQL (IITK PPT)

ChromYQLipchromy-clip

Page 23: YQL (IITK PPT)

Content Analysis with YQL

http://bit.ly/yqlcap

Page 24: YQL (IITK PPT)

One catch with CAP

Page 25: YQL (IITK PPT)

One catch with CAP

URL length is limited , so you have to switch back to POST, method on YQL.

Page 26: YQL (IITK PPT)

iTunes Store Top 10 Songs

Page 27: YQL (IITK PPT)

iTunes Store Top 10 Songs

Page 28: YQL (IITK PPT)

Youtube search

Page 29: YQL (IITK PPT)

Language sugar: randomize

Page 30: YQL (IITK PPT)

Some more???

Page 31: YQL (IITK PPT)

Some more???

Page 32: YQL (IITK PPT)

Lets see some more hacks

Page 33: YQL (IITK PPT)

Picture me

http://bit.ly/pikme

Page 34: YQL (IITK PPT)

What else YQL can do????

Page 35: YQL (IITK PPT)

You can create your own table

Read more bit.ly/yqlODT

Page 36: YQL (IITK PPT)

My random hello!! table

Page 37: YQL (IITK PPT)

You can store

secrets on YQL

Page 38: YQL (IITK PPT)

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

Page 39: YQL (IITK PPT)

Read more here

http://bit.ly/yqloauth

Page 40: YQL (IITK PPT)

More Hacks example here

http://www.purplegene.com/http://bit.ly/markhack

Page 41: YQL (IITK PPT)

Siri vs fake

Page 42: YQL (IITK PPT)

Reach me

@markandey