9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Fedex command
@ 2012-05-31 16:31 V. M. (Mark) Haas
  2012-05-31 18:23 ` Anthony Sorace
  0 siblings, 1 reply; 5+ messages in thread
From: V. M. (Mark) Haas @ 2012-05-31 16:31 UTC (permalink / raw)
  To: 9fans

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 <a@9srv.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Fedex command
Message-ID: <067D6E51-1C58-4B73-8E84-B32C39E3AE99@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>





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] Fedex command
  2012-05-31 16:31 [9fans] Fedex command V. M. (Mark) Haas
@ 2012-05-31 18:23 ` Anthony Sorace
  2012-05-31 20:55   ` steve
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Sorace @ 2012-05-31 18:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

> 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


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 210 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] Fedex command
  2012-05-31 18:23 ` Anthony Sorace
@ 2012-05-31 20:55   ` steve
  0 siblings, 0 replies; 5+ messages in thread
From: steve @ 2012-05-31 20:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On 31 May 2012, at 07:23 PM, Anthony Sorace <a@9srv.net> wrote:

>> 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
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] Fedex command
  2012-05-31 14:24 V. M. (Mark) Haas
@ 2012-05-31 14:38 ` Anthony Sorace
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony Sorace @ 2012-05-31 14:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

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.


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 210 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] Fedex command
@ 2012-05-31 14:24 V. M. (Mark) Haas
  2012-05-31 14:38 ` Anthony Sorace
  0 siblings, 1 reply; 5+ messages in thread
From: V. M. (Mark) Haas @ 2012-05-31 14:24 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/html, Size: 264 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-31 20:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-31 16:31 [9fans] Fedex command V. M. (Mark) Haas
2012-05-31 18:23 ` Anthony Sorace
2012-05-31 20:55   ` steve
  -- strict thread matches above, loose matches on Subject: below --
2012-05-31 14:24 V. M. (Mark) Haas
2012-05-31 14:38 ` Anthony Sorace

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).