![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2011
Device: Kindle
|
How do I handle PHPSESSID cookie?
After Starson17 pointed me in the right direction yesterday with some debug functions in Google Reader, I've managed to progress to the point where I am getting logged into a subscription only site~only to find that the session cookie(s) are not being sent to the server when my recipe gets around to downloading articles.
I was thinking that cookies = mechanize.CookieJar() br = mechanize.build_opener(mechanize.HTTPCookieProcess or(cookies)) would handle sending the PHPSESSID cookie back to the server, but that doesn't seem to be so. So what should I be using to get the sessions to persist for the feed downloads? Thank you, and I promise to put python on my list of things to do... ![]() |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2011
Device: Kindle
|
What appears to be happening is that a new PHPSESSID cookie is generated for each article than I am trying to download, and since the builtin recipe doesn't seem to handle them~the session generated for each article is not available when the request to download it is sent, so no content is retrieved.
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
A debugging approach I've found works well is to try to simulate in Firefox what I "think" is happening in the recipe. Until I can make FF do the same thing, I usually haven't figured out what's wrong in the recipe. It may be a header, a referer, or some other detail. I'm not saying you're wrong about it being cookies, just that each time I thought that, it turned out to be something else and the recipe was handling cookies just fine. Good luck. |
|
![]() |
![]() |
![]() |
Tags |
phpsessid, session cookie |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
The MR Holiday Cookie Exchange | taming | Lounge | 8 | 12-03-2010 01:13 PM |
PocketBook 302 Cookie in UK! | jules_july | PocketBook | 1 | 05-14-2010 01:31 PM |
Cookie / Login Trouble? Read here! | Alexander Turcic | Announcements | 3 | 03-01-2004 08:53 AM |