Webservice hacking for Serchilo

Serchilo is a wiki based plattform for sharing and using web shortcuts with any browser and thus is a database search engine (something all current search engines fail miserably at).

Once you defined a web command in Serchilo you can use it instantly with any browser either via the Serchilo front page or directly via a web shortcut in your browser (not only in Firefox, I myself use it in Konqueror that was the first web brower with web shortcuts a long time ago). So Serchilo makes the end to defining all shortcuts by yourself: Just define one and get all. But how to add a new shortcut to Serchilo itself?

The Serchilo wiki provides a short tutorial for defining a new command. You will quickly notice that you need weblinks to the web service you want to write a command for that allow for manipulating single variables. Technically spoken this means that you need to acess the web service via HTTP-GET queries. But what do do if the URL of a query does not display any useful variables that contain your input data? In these cases the web service uses the HTTP-POST method. All data is thus not visible in the URL and the user cannot bookmark his own query for later reusage. So at first all these web services seem to be inaccessible by Serchilo.

But there is a nice trick: Most web servers don’t care if you send them your queries via POST or GET. So if you can transform a POST query into GET you can access this web services via web shortcuts, too. However none wants to read large HTML source codes full of uninteresting stuff just in order to find the interesting bits. Luckily there are two small helpers that solve this problem: Frmget, a Bookmarklet that transform all POST data to GET upon request and UrlParams that displays all POST and GET variables of a web page and allows for easy analysis and manipulation.

So I was able hacking the web service of my local public transport corporation the Verkehrsverbund Großraum Nürnberg (VGN) and making it accessible via a Serchilo web command. Now I can just directly search for the next connections between two places or just dowload their schedules for any given line or just ask which lines will stop at a certain stop withing the next few minutes without needing to click through their somewhat complicated web page. And of course I just can save my queries and can repeat them at any time.

Furthermore I even found out that their web service does understand some more cool things. Instead of entering a fix date, you can also just say „today“, „tomorrow“, „yesterday“ and „2days“. Nice feature they maybe even don’t know themselves (I guess they bought the web service backend from someone else, as the Serchilo founder Jorges found out that a very similar URL syntax works for another public transport corporation, too).

Happy web service hacking!

Schreibe einen Kommentar

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s


%d Bloggern gefällt das: