All this work is now packaged up into the spider.my Shipping Quotations API. Check there for latest shipping API methods, shipping modules etc.
This morning I modified the International Pos Laju rates ripping code to get a full set of Pos Malaysia’s International Parcel rates. If you use the widget on my blog, you’ll see that the countries to which Pos Malaysia ships by Pos Laju will also offer Pos Parcel ‘Surface’ and ‘Air’ prices where these are available. Try 0.5kg to France, for example. You should see something like the image here.
There are far more countries listed under the Parcel shipping method at Pos’ website, but I’m not listing those for now. I mentioned earlier that there’s an issue with free-format country names on Pos’ website. The Parcel method country names are just as bad as the Pos Laju ones, listing Yugoslavia – for example – which hasn’t existed as a country since 2003. Also, you won’t see parcel quotes for Germany because Pos’ website has it listed as ‘German’ (no ‘y’ – see also Luxembourg and Luxzembourg, Netherlands and Netherland). And the United Kingdom is listed as ‘Great Britain’. The ‘new ‘ countries (including misspelled ones) are all available from the AJAX shipping quotation demonstration page. See the updated XML for a 0.2kg shipment to Bahrain. Full rating tables are also available for download from the shipping rates download page. Here, for example, are all rates for Norway.
It’s an eye-bleedingly pains-taking job ripping this data. I mentioned previously the omission of per-country max weights on some Pos Laju quotes, resulting in a default (I guess) max weight of 999kg being offered. The max weights all seem to be present on the Parcel quotes, but the tables don’t all give prices up to the max weight, using ‘-’ (I imagine) to signify that the upper weights are not available. This simply isn’t good enough for use in 3rd party computer systems. I incorporate some guesses in my ripping code in order for it to run to completion, despite the inconsistencies in the Pos data. This on its own would be a good reason why no other entity besides Pos Malaysia should provide shipping data.
I’ve sent emails so far to csc and corpcomm at Pos in an attempt to find someone I can talk to about this stuff. It would take only minutes to put the API online on Pos Malaysia’s domain, and possibly only a day to apply Pos branding to it. If (as I hope) Pos were to use spider.my’s Spinneret web server, they would instantly be able to serve millions of queries per hour from just about any old hardware they had lying about the office. In tests on my 4-year-old laptop, Spinneret can serve an average of 1,500 shipping quotations per second – before optimisations, and with the server test software running on the same machine! I should have made Spinneret open source before now, but would provide a full set of sources to Pos in any case.
If anybody has a suggestion of who I could contact to expedite this matter, please let me know? Thanks!