Select * from internet

554 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
554
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Select * from internet

  1. 1. $ Hello!
  2. 2. $ whoami@markandey
  3. 3. I work @Yahoo!
  4. 4. I am a{JavaScript} Hacker
  5. 5. Advertising on web is not same as on paper.
  6. 6. On web, Ads Have power of HTML5.
  7. 7. To make great (html5 app) Ads
  8. 8. shift your point of view
  9. 9. From Ad to data
  10. 10. From Ad to data
  11. 11. Ad is not start
  12. 12. Ad comes at the end and needmost of the work
  13. 13. What you start with is information and a goal
  14. 14. What you start with is 1nf0rmat10n and a goal
  15. 15. On Web informationis not always structured
  16. 16. YQL makes easy toaccess unstructured data
  17. 17. YQL isYahoo! Query Language
  18. 18. YQL is Yahoo! Query Languageand its not a language of its own.
  19. 19. YQL is aweb servicewhich works on SQL like syntax
  20. 20. YQL lets youaccess data from Yahoo!
  21. 21. YQL lets youaccess data from Yahoo! & rest of web
  22. 22. Select {What} from {service} where {condition};
  23. 23. For example
  24. 24. select * from flickr.photos.search where text=”Delhi" andapi_key=2149834c0fb3e9e84de9c31d50c 7a97d
  25. 25. Lets start with YQL console
  26. 26. SELECT A TABLE
  27. 27. SEE QUERY HERE
  28. 28. OUTPUT
  29. 29. TAKE AWAY QUERYURL
  30. 30. http://query.yahooapis.com/{query} URL  Output<xml> { ‘json’:’json’</xml }
  31. 31. Lets see with example
  32. 32. select * from flickr.photos.interestingness
  33. 33. Here is the code
  34. 34. JSON{ “photo”: “xyzphr”, “user”: “phfhfb”}
  35. 35. JSON with callback foo ({ “photo”: “xyzphr”, “user”: “phfhfb” });
  36. 36. This is what you gethttp://bit.ly/yqlflickr
  37. 37. YQL With PHP$session = curl_init($yql_query_url);curl_setopt($session, CURLOPT_RETURNTRANSFER,true);$json = curl_exec($session);
  38. 38. YQL With YUIYUI().use(yql, function(Y) { Y.YQL(select * from weather.forecast where location=90210, function(r) { //r now contains the result of the YQL Query //use the YQL Developer console to learn //what data is coming back in this object //and how that data is structured. });});
  39. 39. Page Scrapingselect * from html where url=“------" and xpath=“--------”;
  40. 40. Delhi FM Radio
  41. 41. URLselect * from html whereurl=“http://www.radiomirchi.com/delhi" andxpath=“…”;
  42. 42. XPATHselect * from html whereurl=“http://www.radiomirchi.com/delhi" andxpath=“//marquee[@id="ticker_nowplaying"]”;
  43. 43. You can search currently playing song on youtubeselect * from youtube.searchwhere query="currently playing song”
  44. 44. Can you think of a hack??? +
  45. 45. This is what You get http://bit.ly/ yqlmirchi
  46. 46. ChromYQLip chromy-clipbit.ly/yqlhtml
  47. 47. Content Analysis with YQL bit.ly/yqlcap
  48. 48. One catch with CAP
  49. 49. One catch with CAP URL length is limited , so you have to switch back to POST, method on YQL.
  50. 50. Lets see some more hacks
  51. 51. Picture me bit.ly/ pikme
  52. 52. What else YQL can do????
  53. 53. You can create your own tableRead morebit.ly/yqlODT
  54. 54. My random hello!! table
  55. 55. You can storesecrets on YQL
  56. 56. Twitter oauthSELECT * FROM twitter.STATUS.timeline.friendsWHERE oauth_consumer_key = 9DiJt6Faw0Dyr61tVOATAAND oauth_consumer_secret =XBF9j0B2SZAOWg44QTu6fCwYy5JtivoNNpvJMs6cAAND oauth_token = 18342542-NkgUoRinvdJVILEwCUQJ3sL2CIm2ZwzS5jjj2Lg7yAND oauth_token_secret =D6ewAzsueTzQmrAJGFH0phV5zgWT88FOtcMeqW4YeI; oauth_consumer_key oauth_consumer_secret YQL oauth_token Local storage oauth_token 60
  57. 57. Read more here http://bit.ly/ yqloauth
  58. 58. Placemaker: geo this
  59. 59. You Can Also AccessGoogle Spreadsheet via YQL
  60. 60. You need to publishspreadsheet to the web
  61. 61. You need to publish spreadsheet to the webhttps://docs.google.com/spreadsheet/pub?key=0AgGxPO1AxEhldFZDNzAzQldLSGp2MzVGVXdlUnIxeUE&output=html
  62. 62. You need to publish spreadsheet to the webhttps://docs.google.com/spreadsheet/pub?key=0AgGxPO1AxEhldFZDNzAzQldLSGp2MzVGVXdlUnIxeUE&output=CSV
  63. 63. You need to publish spreadsheet to the webhttps://docs.google.com/spreadsheet/pub?key=0AgGxPO1AxEhldFZDNzAzQldLSGp2MzVGVXdlUnIxeUE&output=CSVselect * from csv where url=’….
  64. 64. Google Spreadsheetswrite-protected can havespecific access.
  65. 65. More Hacks herehttp://bit.ly/markhack
  66. 66. Siri vs fake http://bit.ly/ sirichrome
  67. 67. Reach mehttp://bit.ly/yqlflickrhttp://bit.ly/yqlmirchihttp://bit.ly/yqlhtmlhttp://bit.ly/yqlcap twitterhttp://bit.ly/pikmehttp://bit.ly/yqlODT @markandeyhttp://bit.ly/yqloauthhttp://bit.ly/markhackhttp://bit.ly/sirichrome

×