Sending cookies with URL requests
Hello,
Are there any plugins that I can take a look at on how to send cookies with url requests?
I'm coming from python:
Can anyone point me to a plugin that uses cookies? I've searched online, but none of the methods listed seem to be available.
Thanks!!
Are there any plugins that I can take a look at on how to send cookies with url requests?
I'm coming from python:
- Code:
self.cj = CookieJar()
#Setup URL handler
self.login = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cj),urllib2.HTTPSHandler)
#Define my cookies
self.auth_cookie = "foobar"
self.session_cookie = "foobar3000"
#Append my cookies
self.login.addheaders.append(('Cookie', "auth=%s;session=%s" % (self.auth_cookie, self.session_cookie)))
#All subsequent requests will send the cookies
print self.login.open("http://www.example.com/video/12342/xml").read()
print self.login.open("http://www.example.com/video/323448745/xml").read()
Can anyone point me to a plugin that uses cookies? I've searched online, but none of the methods listed seem to be available.
Thanks!!