Discussion:
[9fans] Fedex command
(too old to reply)
V. M. (Mark) Haas
2012-05-31 14:24:22 UTC
Permalink
<div style="FONT-FAMILY: Arial; COLOR: #000000; FONT-SIZE: 12px">Has anyone investigated or used this command recently? I'm not &quot;smart&quot; enough to figure out quite how it is failing (or how it succeeded).<br /><br />Regards,<br />-- Mark<br /></div>
Anthony Sorace
2012-05-31 14:40:43 UTC
Permalink
The fedex command (like ups and usps) work by scraping the HTML on the
public web site. That changes fairly often, and fedex & co need updates each
time. It's not terribly difficult, but it's tedious and frequent. I end up tweaking
these about every other time I want to track a package.

Most (all?) such places provide actual RESTish APIs to use, but those require
(generally free) keys/accounts. After my last round of tweaking fedex I took a
stab at rewriting it to use those, but stalled.
V. M. (Mark) Haas
2012-05-31 16:31:29 UTC
Permalink
I started to look at that as well.

The published APIs didn't seem to lend themselves to a simple screen-scrape.

Ideas?
-- Mark
----------------- Original Message ---------------------------
Message: 4
Date: Thu, 31 May 2012 10:38:57 -0400
From: Anthony Sorace <***@9srv.net>
To: Fans of the OS Plan 9 from Bell Labs <***@9fans.net>
Subject: Re: [9fans] Fedex command
Message-ID: <067D6E51-1C58-4B73-8E84-***@9srv.net>
Content-Type: text/plain; charset="us-ascii"

The fedex command (like ups and usps) work by scraping the HTML on the
public web site. That changes fairly often, and fedex & co need updates each
time. It's not terribly difficult, but it's tedious and frequent. I end up tweaking
these about every other time I want to track a package.

Most (all?) such places provide actual RESTish APIs to use, but those require
(generally free) keys/accounts. After my last round of tweaking fedex I took a
stab at rewriting it to use those, but stalled.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.9fans.net/private/9fans/attachments/20120531/9c7ed152/attachment-0001.pgp>
Anthony Sorace
2012-05-31 18:23:08 UTC
Permalink
Post by V. M. (Mark) Haas
The published APIs didn't seem to lend themselves to a
simple screen-scrape.
Well, they're mostly XML/SOAP, which is a pain, but they're not too rough as
such things go. Certainly they change a lot less than the web pages do, so
even if you're just using exactly the same techniques on what's returned it
should be an improvement from a reliability perspective. UPS's seem a bit
better than FedEx's (I don't recall looking at USPSs). FedEx has a "web
integration" thing which might be easier to use here, but I don't know details.

If you don't want to do that, I think the only other option is another round of
updating the HTML scraping that's there now.

Anthony
steve
2012-05-31 20:55:04 UTC
Permalink
I did investigate writing a plan9client for Jira
earlier this year. it exposes its apis as soap, xmlrpc and rest
so i could use any. from the little i have read rest looks
preferable though i speak from a position of little knowledge here.

i hoped to write a genetic REST 9p file server that would allow
you to send and receive simple requests via a virtual file, in the
style of webfs.

i have a DOM model xml parser that i used in wdfs (webdav fs) in my
contrib that i planned to reuse.

the advantage, of course, is the restfs could be reused for ups, fedex, jira, etc.

sadly this got no further than a thought experiment due to work pessures,
and recent family pressures (twins born last week) could also slow progress...

-Steve
Post by Anthony Sorace
Post by V. M. (Mark) Haas
The published APIs didn't seem to lend themselves to a
simple screen-scrape.
Well, they're mostly XML/SOAP, which is a pain, but they're not too rough as
such things go. Certainly they change a lot less than the web pages do, so
even if you're just using exactly the same techniques on what's returned it
should be an improvement from a reliability perspective. UPS's seem a bit
better than FedEx's (I don't recall looking at USPSs). FedEx has a "web
integration" thing which might be easier to use here, but I don't know details.
If you don't want to do that, I think the only other option is another round of
updating the HTML scraping that's there now.
Anthony
Loading...