gmail from perl
smalhotra
created: 2004-06-14 11:40:12
Has anyone tried to access gmail from perl? I was thinking of writing an interface but gmail uses a lot of javascript which might get tricky. Does anyone have any experience with this?

$will->code for @food or $$;

Re: gmail from perl
created: 2004-06-14 12:43:30
Interesting question but...

Actually gmail is not available for "mere mortals" yet, so it's kinda hard to tell which JavaScript tricks it uses or not...

I think it's better to wait for gmail public availability so you can get your answers.

Best regards,

my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");
Re: gmail from perl
created: 2004-06-14 14:37:03
Just use HTTP::Recorder to generate a CPAN://WWW::Mechanize script that does it.
This does not work
created: 2004-06-14 15:56:28
Apropos of some recent discussions, I've got HTTP::Recorder working right now, and clicking on Javascript thingies creates only a blank line in the output log, for instance:

$agent->get("http://www.oreilly.com/"); #go to oreilly.com
                                #click on upper-right JS thingie; nothing logged
$agent->get("http://www.oreilly.com/"); #back button


If I'm missing something, please set me straight-- but I see no evidence that anything done with Javascript is captured at all by HTTP::Recorder or HTTP::Proxy.
Re: This does not work
created: 2004-06-14 17:08:08
My guess would be that it doesn't log anything because it doesn't actually do anything that involves the server. That means it can be ignored, if the goal of the script is to grab some data from the server.
Re^2: This does not work
created: 2004-06-14 17:12:33
I dont' think so. I also tested it against an in-house app on IE that is known to pass all kinds of stuff to and from the server, all in JS code-- HTTP::Recorder captured no traffic at all.

Something about JavaScript makes interaction with the server invisible. I really like HTTP::Recorder, I wish I could figure out to expose that traffic.
Re^3: This does not work
created: 2004-06-14 17:51:19
Sorry, but I think you've configured something wrong or else the stuff you believe is being loaded from the server was pre-loaded in some way. The server only handles HTTP, so anything fetched from it must use HTTP, which means it must go through your HTTP proxy, which is dumping everything to HTTP::Recorder. Ther is nothing magical about JavaScript.
Re: gmail from perl
created: 2004-06-15 00:48:34
*yosucker

Having heard that it might work very similarly to Yahoo mail, you could have this perl script as a reference.

Note: what is really certain is that Yahoo handles a lot of its pages with great and sofisticated Javascript.

* https://sourceforge.net/projects/yosucker/

.{\('v')/}
_`(___)' __________________________

perlmonks.org content © perlmonks.org and chanio, DaWolf, McMahon, perrin, smalhotra

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03