Stealing Google Logos using Yahoo API
Many love browsing through Google Logos, so do some of my friends, was planning to make a simple page with infinite scroll with all the Google Doodles so far.
The idea
To programmatically fetch all Google logos so far and display it with infinite scroll, also to keep the page in sync with Google logo list.
The plan
Using Yahoo! YQL to select the required section from the Google logo page and display the images suitably. As YQL also returns a JSON, displaying the required images was not a big issue.
The key ingredients : Yahoo! YQL + Jquery
The recipe :
Fetching images :
0. Set query for YQL.
1. $.getJSON() and parse the required data.
2. Append the img's to a div.
Infinite Scroll :
0. Get the document height.
1. Set pageoffset.
2. Using $(window).scroll() method, set the new pageoffset.
3. Based on the id of the last img loaded, load more images.
Limitations :
# Per application limit (identified by your Access Key): 100,000 calls per day.
# Per IP limits: /v1/public/*: 1,000 calls per hour; /v1/yql/*: 10,000 calls per hour.
DEMO!
Recent blog posts
- watir-webdriver web inspector
- gem list to gemfile
- Packing ruby2.0 on debian.
- Made it into The Guinness Book!
- to_h in ruby 2.0
- Filter elements by pattern jQuery.
- Better HTML password fields for mobile ?
- Grayscale image when user offline
- nth-child CSS pseudo-class Christmas colors
- EventEmitter in nodejs