How do I enter/receive webpage information?

Jorgen Grahn jgrahn-nntq at algonet.se
Sun Feb 6 12:33:48 EST 2005


On 05 Feb 2005 22:58:52 +0000, John J. Lee <jjl at pobox.com> wrote:
> Jorgen Grahn <jgrahn-nntq at algonet.se> writes:
> [...]
>> I did it this way successfully once ... it's probably the wrong approach in 
>> some ways, but It Works For Me.
>> 
>> - used httplib.HTTPConnection for the HTTP parts, building my own requests
>>   with headers and all, calling h.send() and h.getresponse() etc.
>> 
>> - created my own cookie container class (because there was a session
>>   involved, and logging in and such things, and all of it used cookies)
...

> I see little benefit and significant loss in using httplib instead of
> urllib2, unless and until you get a particulary stubborn problem and
> want to drop down a level to debug.  It's easy to see and modify
> urllib2's headers if you need to get low level.

That's quite possibly true. I remember looking at and rejecting
urllib/urllib2, but I cannot remember my reasons. Maybe I didn't feel they
were documented well enough (in Python 2.1, which is where I live).

[more useful info snipped]

/Jorgen

-- 
  // Jorgen Grahn <jgrahn@       Ph'nglui mglw'nafh Cthulhu
\X/                algonet.se>   R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list