View Single Post
Old 12-14-2016, 09:03 AM   #20
leo738
Enthusiast
leo738 began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2011
Device: Kindle 3
Thanks for the reply. A bit confusing though. When I look in my browser after login I see cookies such as:

IT_paywall
IT_PW_AUTH
IT_UUID

etc. etc.

(I notice some have domain name associated with them, some domain. Don't know what the difference is)

but on the command line response from the server to login I see something like:

Code:
{u'error_number': u'0', u'firstname': u'Leo', u'varnish_id': u'1481723438.8521186.4e0191ae22e2f018d26a62b41b064388.1ad0aa2e097b79b4e54b7951b7e73b1ccc7654cd840e55cd4604c9263d8590cf', u'error_message': u'', u'entitlements': [u'app', u'crossword', u'archive', u'paywall', u'epaper'], u'session_token': u'4e0191ae22e2f018d26a62b41b064388', u'user_id': u'8515186'}
So I was unsure of what name to use. I'm going to try guessing at what corresponds to what & have a go, e.g:

Code:
br.set_cookie('IT_entitlements', data['entitlements'], '.irishtimes.com')
        br.set_cookie('IT_pw_userdata', data['user_id'], '.irishtimes.com')         
        br.set_cookie('IT_paywall', data['session_token'], '.irishtimes.com')
        br.set_cookie('IT_PW_AUTH', data['varnish_id'], '.irishtimes.com')
leo738 is offline   Reply With Quote