Log-in to forums (using cookielib)?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue May 1 05:06:08 EDT 2007
En Tue, 01 May 2007 05:39:14 -0300, Olivier Oost <nomail at gmail.com>
escribió:
> Gabriel Genellina wrote:
>> En Tue, 01 May 2007 04:44:57 -0300, Olivier Oost <nomail at gmail.com>
>> escribió:
>>
>>> Can someone please tell me how I should log-in and leave a message on
>>> the board?
>> Sure. But considering that this smells like an Automatic Spamming
>> Machine, I hope nobody will.
> No, it's not meant as a spamming machine. I only need to post a message
> and then (if that's possible) lock the topic (I'm admin on the forum
> where I need this). The program first needs to read the topic for
> certain words (that's already working), and then reply that those words
> aren't welcome.
I would verify that in the forum code if possible, not remotely.
Anyway, the examples at the end of the cookielib section in the library
reference are what you need: create an OpenerDirector using
urllib2.build_opener, adding a suitable HTTPCookieProcessor handler.
--
Gabriel Genellina
More information about the Python-list
mailing list