I'm building an extra provider for Sickbeard and having problems with my cookies. I've been looking for a long time now after why cookies are missing in the HTTP Response when using requests.
login_params = {'uid': sickbeard.PROVIDER_USERNAME,
'pwd': sickbeard.PROVIDER_PASSWORD,
}
try:
response = self.session.post(self.urls['login'], data=login_params, timeout=30)
except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError), e:
logger.log(u'Unable to connect to ' + self.name + ' provider: ' +ex(e), logger.ERROR)
return False
The response only contains one cookie the __cdfuid cookie:
requests.utils.dict_from_cookiejar(self.session.cookies)['__cfduid']
The cookies that I get (and want) when logging into the provider are __cdfuid | uid | pass:
requests.utils.dict_from_cookiejar(self.session.cookies)['__cfduid']
requests.utils.dict_from_cookiejar(self.session.cookies)['uid'] #Not passed
requests.utils.dict_from_cookiejar(self.session.cookies)['pass'] #Not passed
I don't know if it matters but the __cdfuid cookie is the only one that has HttpOnly and path=/ parameters set. The other two just has expiration and the actual data.