Hi, i am trying to forge a new cookie by own with cookielib. But i don't
still have success. This a simply code:
import cookielib, urllib, urllib2
login = 'Ia am a cookie!'
cookiejar = cookielib.CookieJar()
urlOpener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar))
values = {'user':l
Matthew Franz wrote:
> I'm not sure what you mean be forge, but if you mean set an arbitrary
> cookie manually (vs. one that was provided by the server). just use
> add_header() in http://docs.python.org/lib/request-objects.html
Yes is exactly what i want to do... i don't known because i looked
John J. Lee wrote:
> Fine, but see my other post -- I think you misunderstand how cookies
> work.
Maybe you misunderstand me... While i wrote "cookie are simply http
header :)" i want to said that i've look at wrong thing, cookielib are not
needed... Anyway thank you for help, regards.
--
http:
I write this simply code that should give me the access to private page with
htaccess using a proxy, i don't known because it's wrong...
import urllib,urllib2
#input url
url="http://localhost/private/file";
#proxy set up
proxy_handler = urllib2.ProxyHandler({'http': 'http://myproxy:'})
#h