[Tutor] urllib, urlopen and the evil frames
Kalle Svensson
kalle@gnupung.net
Fri, 6 Apr 2001 19:50:19 +0200
Sez Glen Wheeler:
> Anyway, I've gotten past step 1, and I logged in by just passing
> arguments to a few cgi scripts in an order using urllip.urlopen but when I
> get to navigating around in step 2 I just get returned (through ye olde
> urllib) 'blah blah This browser does not support frames'. So I thought
> 'bah who needs that page anyway' and then tried to access the market
> cgi-script using urlopen but then it spits at me saying I haven't logged
> in yet.
This sounds like a cookie problem. I had aone like it a while ago, and I
have some extremely undocumented, unsupported and application-specific code
to send you if you're interested.
Basically, I grab a cookie from the login page and then use that cookie to
authenticate myself to the script I want to access.
The frames problem is most easily solved by parsing the html and then
urlopening the frame contents too.
Peace,
Kalle
--
Email: kalle@gnupung.net | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
[ Not signed due to lossage. Blame Microsoft Outlook Express. ]