Playing with YQL

May 17th, 2009

Note: this is an edited repost from Halans.com.

Have been playing with Yahoo!’s YQL this weekend, querying the Sydney Ferries website. Pretty amazing what it allows you to do, though the Sydney Ferries site wasn’t the best site to start playing with I guess. I did have a need to have the ferry timetable on my iPhone (especially the Neutral Bay service), so that’s why I put together Next Sydney Ferry this weekend.

The premise is pretty simple: when does the next ferry depart from Circular Quay? I had this wild idea to do cool stuff with it, but inspired by the simplicity of Next Manly Ferry, I thought I’d start out pretty simple too. And it certainly still is a work in progress with plenty of bugs.

NextSydneyFerry.com parses the timetables of the SydneyFerries.info site using YQL and JSONP. No luck with any API, so it’s pretty fragile reading in the HTML table data. Wish they made an effort marking up the data a bit more helpful (as in markup-as-an-api). One of the URLs even has a typo (“weekemd”). I additionally notice YQL not returning any results for the same query, while at other times it would, so they have some bugs too. It was an interesting YQL experiment, but since the data is not too dynamic, I will probably switch to using a more static datastore, which would also be a lot more responsive, and which would be lighter on your mobile dataplan. This is very much a first version application, with limited functionality (it shows you only the next and thereafter ferry, and only departing from Circular Quay), some noteworthy points:

  • it uses the server’s time so tourists don’t have to have their mobiles set to local time.
  • it updates the time in the background without a page refresh.
  • It allows you to bookmark your daily service.

Sydney Ferries allows you to repurpose their content, as long as you add their copyright notice and don’t charge for it. But they could have made it a lot easier for people to do so.

Category: Javascript

Author: JJ Halans

Tags: , , , ,

Yahoo queries microformats

January 17th, 2009

Yahoo’s YQL query language, a SQL-style query language for the web, now supports microformat queries. A given example is finding the address for an event on Upcoming (a Yahoo service), not using the Upcoming API, but using a YQL query to retrieve a vCard microformat in either XML or JSON, using a REST call. But it’s not limited to Yahoo services only! It works on any website with microformats, like, lets say “halans.com”, where my about page contains a vcard. Result: http://query.yahooapis.com/v1/public/yql?q=select%20adjunct.item.type%20from%20microformats%20where%20url%3D%27http%3A%2F%2Fwww.halans.com%2Fabout%2Fprofessionally%2F%27%20&format=xml

As Chris Heilman writes over at the Yahoo! Developer Network Blog:

“This will hopefully make it much easier for people to write software that consumes microformats and maybe bring the “chicken” of adding microformats and the egg of finding good uses for them a bit closer together.”

You could now use Yahoo SearchMonkey to find microformats around the web (example searchmonkeyid:com.yahoo.page.uf.hcard or “searchmonkeyid:com.yahoo.page.uf.geo halans“) and then query the microformats inside the SearchMonkey results with YQL.

Category: Microformats, Semantic Web

Author: JJ Halans

Tags: ,

Yahoo! Search understands semantics

March 17th, 2008

Yahoo! Search announced that it will support semantic web standards, like Microformats, RDFa and Dublin Core:

By supporting semantic web standards, Yahoo! Search and site owners can bring a far richer and more useful search experience to consumers. For example, by marking up its profile pages with microformats, LinkedIn can allow Yahoo! Search and others to understand the semantic content and the relationships of the many components of its site.

By getting this out in the open, maybe other search engines (think “G”) might come out and proclaim their love for the semantic web?

You can try it out for yourself at Yahoo! Microsearch.

Category: Microformats, Semantic Web

Author: JJ Halans

Tags: , , , , , ,