Markandey Singh
10 THINGSWhich you can’t do
without YQL!
I am
MarkandeySingh,
I work @ Yahoo!
2
&I am a JavaScript
Hacker
3
javacript != java
5
10 THINGSWhich you can’t do
without YQL!
This is
workshopsession
6
And mostly about{code}
7
#1Converting Any XMLREST API to JSON API
11
12
http://www.cleartrip.com/places/hotels/info/41750
13
XML API JSON API
select * from xml where url=‘……’
#2Cross Domain AJAX
15
16
Domain-1Domain-2
XMLHttpRequest
17
Domain-1Domain-2
XMLHttpRequest
✗
18
Domain-1Domain-2
XMLHttpRequest
19
Domain-1Domain-2
JSONP✔
#3Parsing HTML on cloud
21
22
http://www.purplegene.com/static/invalid_html_example.html
23
http://www.purplegene.com/static/invalid_html_example.html
Div , body and html is not closed
24
http://www.purplegene.com/static/invalid_html_example.html
Div , body and html is not closed
#4JavaScript only page
scraping
26
27
http://passportindia.gov.in/AppOnlineProject/online/chiefOfficer
#5Converting dead web
into live widget
30
Computer jokes
31
http://www.guy-sports.com/humor/computers/computer_10laws.htm
#6creating logic as
service
33
#7hiding JavaScript execution secret
36
37
SET max_results='1' ON youtube.search;select * from youtube.search where query="louis ck"
38
SET max_results='1' ON youtube.search;select * from youtube.search where query="louis ck"
#8OAuth client without
having a server
40
41http://derek.io/blog/2010/how-to-secure-oauth-in-javascript/
Twitter oauth
42
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';
Twitter oauth
43
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
45
https://chrome.google.com/webstore/detail/ggdpdjbjioohmgdhmegcbnodpdcamhpj
48
https://github.com/markandey/mojito-example-youtube
49
http://www.markandey.com/