[twill] Automatic e-mail control.

Titus Brown titus at caltech.edu
Sun Nov 6 13:02:05 PST 2005


-> -> Logging into the mail operator URL 
-> -> (yahoo in my case) is different if you use 
-> -> "go + URL" in interactive twill or using a browser
-> -> (clicking for ex. on a bookmark item).
-> 
-> Indeed it must not be English, if you say: 
-> -> It sounds to me like you didn't use twill to log ->
-> in.
-> 
-> But in the end I must confess that I've lost my hopes
-> of finding a mean to emulate the user.
-> Twill can automatically operate on web (loading URLs,
-> filling forms, pressing buttons and so on) but it is
-> obviously different from browsers, and html servers
-> (for security reasons) can reject it or divert it
-> through the initialization or login phase.
-> What I need is a "macro" language which emulates the
-> user, but it seems that it is impossible in Linux...

You should definitely try out PAMIE, 

	http://pamie.sourceforge.net/

which can automate IE.

It is entirely possible for twill to emulate a "real" browser; the trick
is figuring out why it doesn't work in this case.  I'd be interested
in seeing the output of twill in your case after you do a

	debug commands 1
	debug http 1

in your script; if you can send it to me, I may be able to help you.
(Remember to remove your password(s) from the output!)

Most sites don't distinguish (at the HTTP level) between Mozilla, IE,
and any other browser the user cares to use; usually the differences are
in page design and JavaScript.  If twill isn't working for you, you've
either hit a site that *does* care or it's a bug in twill!

-> Besides that I want to learn more on Internet
-> operations and on cookies in particular. 
-> By the way, IMHO, you, as the author, should know
-> where your program save the cookies (if not from where
-> they come from with "load_cookies?)
-> If you have this info, that can be of some utility,
-> also only just to deepen my know-how on cookies 
-> (very poor till now).

Well, of course I know where twill puts cookies ;).  (See the
TwillBrowser.__init__ function for the definition of the cookie jar.)
What I don't know is where your browser puts them, so it's difficult to
have twill load them from an already initialized browser -- which I
understood to be your goal.

cheers,
--titus



More information about the twill mailing list