Hello, Manchester!

Paul Henry emmo at hotmail.com
Wed Apr 4 13:40:31 CDT 2001


This is a weird mailing list, there doesn't seem to be a "Reply-To" field,
so when you reply to a message, it assumes you want to send it to the
original sender, i.e. a private email.

Matthew wrote:
> Blimey, no traffic for six omnths and suddenly we're all coming out of the
> woodwork!

Indeed. I was subscribed to a number of Manchester-oriented mailing lists,
e.g. at Yahoo Groups, and also some newsgroups, but never much traffic! I
guess "Manchester" is too general a concept to generate traffic.

However, its good to know there are fellow Perl hackers out there.

> The whole beer concept is good, reminds me of ThatLondon.pm, who are a
fine
> bunch of m(o|u)ngers. Or how about TVRs?
>

TVRs?

Beer: Since I have no life, I am available most evenings (except Tues and
Thurs) and weekends, and actually during afternoons as well, since I am
working from home :)

So if we want a get together we have to decide on a date, a time, and a
location, although all these variables are independently flexible.

How about:

Sunday 8th April, 2pm, Lass O'Gowrie
    or
Monday 9th April 6pm, Lass O'Gowrie

Vote now! If you are not available, say when you are and we'll modify the
above until we get something that works for most people!

> So, is Manchester.pm an active group, aand if not, shall we make it one?

Sounds like a plan. The reason I joined was that I am getting stuck on the
project I am working on and would like to discuss it with people (not
"stuck" as in broken, but "stuck" as in "where should I go from here?").
Naturally I could post to the various Perl newsgroups, but I also want to
make local contacts and network a little, with the possibilty of working on
projects in the future. Also its a lot easier to explain face to face!

OK, here's what I have been doing. I wanted to develop an auction alert
system, so that if a product appeared on eBay, my web robot would detect it
and send a message (it was SMS) to a subscriber, along the lines of
"Thinkpad DVD available!"

So this led me to writing a specific interface to eBay to extract
information using HTML::TokeParser or whatever it was called. This worked
OK, but if I wanted to do the same thing for, say, QXL, then it would mean
another speicific interface, etc.

So I looked to see if there was any generic "Web API" software out there:
there was the WWW:Search modules on CPAN, but I did not like these as the
interface was programmatic as opposed to defined (I was thinking it would be
nice to store interface definitions on a database). I also had a look at
WIDL from webMethods (Web Interface Definition Language) which was just what
I wanted, but couldn't find any code out there for Perl, and the only open
source WIDL implementation was in Java.

So I wrote something myself called WAPI. Here's the synopsis:

use WAPI::eBayUK;

my $wapi = WAPI::eBayUK->new();

if ($wapi->search("Thinkpad")) {

    $results = $wapi->messages();

    $first = shift @$results;

    print "$first\n";
}

(messages are SMS-sized results from the website).

OK, I use a two stage process to extract the information: I filter out
irrelevant tags, and I use regular expressions to extract the values. This
gives a fairly robust interface to the web service (although certain changes
would break it).

I've written these WAPI interfaces to eBay.co.uk, Jobserve.com, BBC.co.uk,
Blackstar.co.uk, Kitbag.com, MadAboutWine.com, and Lastminute.com

Find an example WAPI interface attached to get an idea of what you would
need to do to define and interface to a web service.

To me the value is the ability to create these simple web interfaces (like
eBayUK.pm) - it takes me between 1 hour or 1 day depending on the site, but
its a bit of a learning curve to understand whats wanted.

So I am just looking for a bit of feedback, seeing if there is an easier way
to do this, and also learn from people.

Any feedback welcome!
-Paul

P.S. If you reply in regard to the Beers, don't forget to send it to the
rest of the list!

--
Paul Henry                                      Cybernetic Entomologist
emmo at hotmail.com        +44 (0)7803-723 400    www.non-aristotelian.com
"I put instant coffee in a microwave oven and almost went back in time."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eBayUK.pm
Type: application/octet-stream
Size: 4764 bytes
Desc: not available
Url : http://mail.pm.org/archives/manchester-pm/attachments/20010404/7b38739d/eBayUK.obj


More information about the Manchester-pm mailing list