Hacks 94-100

Hacks #94-100

The concept of leeching has been with us since day one, from the original land squatters, to rude time sharers in college computer labs, to BBS hogs who tied up the server's only phone line. The concept is strictly "the tragedy of the commons": most people just won't give back the resources they take. In this chapter, we'll discuss how we can use our scraping skills for the good of others.

The up-and-coming most popular way of providing your data to the world is through the use of application programming interfaces (APIs). Much like you can call LWP::Simple 's get function [Hack #9] without having to worry about creating network sockets and following HTTP protocols, an API to your data allows visitors to get the information they desire quickly and simply. In essence, you're removing the need for them to scrape and spider your site.

Arguably, Internet APIs hit the true mainstream when Google announced one for its entire database (http://api.google.com). After a few tentative steps, use of the API exploded and Google Hacks , dedicated to teaching, exploring, and exploiting the technology, became a New York Times best seller.

More APIs quickly followed, the second big announcement coming from Amazon.com (http://www.amazon.com/ webservices /). There was no hesitation: Google had broken the ice, and developers flocked to the Amazon.com Web Services API, quickly creating libraries, shopping-cart builders, plug-ins for weblog software like Movable Type, and more. The proverbial ball had started rolling.

Existing APIs like O'Reilly's Meerkat (http://www.oreillynet.com/meerkat/), Syndic8 (http://www.syndic8.com/services.php), and NewsIsFree (http:// newsisfree .com/webservice.php) received renewed interest, while never-before-seen APIs like Technorati (http://developers. technorati .com/wiki/) and All Consuming (http://allconsuming.net/news/000012.html) were welcomed with open arms.

Giving back to the world by creating a standard and well-defined interface will bring you the thanks, respect, and happiness of a great many people. Whether you create syndicated content with the RSS format [Hack #94], an interface through instant messaging software [Hack #99], or your very own API in one of three flavors, you'll make your data easier to repurpose and also make it easier to create brand new applications never dreamed of. All Consuming [Hack #66], for instance, merges data available from Weblogs.Com, Amazon.com, and Google, while Technorati [Hack #70] works by aggregating weblog information.



Spidering Hacks
Spidering Hacks
ISBN: 0596005776
EAN: 2147483647
Year: 2005
Pages: 157

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net