YQL Page Scraping (Yes, anyone can do it)

One of the most common use of YQL is getting data from any page on the internet(page scraping/Web scraping), thats why some of the people say yql can do
"Select * from Internet"

What is YQL?
YQL or Yahoo Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web services.
Every YQL statements gets translated into a URL (a REST query) which gives back the data u queried.
All data from YQL can be consumed in form of JSON or XML. Here is a demo html and JavaScript Code which is using YQL Rest API to consume data in JSON.

You can simply copy paste above code in an html file and load in browser to see its functionality. Code loads JSON from YQL via a script tag at the bottom of page. This JSON comes with a callback function named 'renderYQL', the function will render the json on your page. function renderYQL is defined above in the html (well before your json might arrive).

Play around with it change URL and XPATH to get different data from internet!

More Resources?

How to hack URL Shorteners to store your Images (icons)?

Note:This is not very useful hack , but lil fun

What URL shortners do? They take a long url and gives back a small one, that is
1.They can be used for compression.
2.They can be used to store any long data in short format.

As you know that an image can be represented in form of data uri as well, something like this

<img src="data:image/jpg;base64,blah blah;" />

here "blah blah" is the base64 incoded image data.

On My site I created a handler which spits a small html with img tag with the src field as whatever given to this handler in query string!

if query is a data uri then it will display the image in your browser, and this image will be hosted no where but in the URL u just created!

Since this url is long u can shorten with bit.ly and get a shorter version.

Thats it you just stored an image on bit.ly

Here is the Demo http://bit.ly/b6ZBXV