I'm trying to load cookies into the python requests module . Using the FF extension 'advanced cookie manager' (https://www.facebook.com/cookiemanager ), I've exported cookies from firefox into a textfile that looks like:
.xxx.net TRUE / FALSE 1435176898 _gat 1
.xxx.net TRUE / FALSE 1498248358 _ga GA1.2.749243760.1435176299
.YYY.com TRUE / FALSE 1488730321 _ga GA1.2.630339061.1425658321
.YYY.com TRUE / FALSE 1472993710 __qca P0-913150413-1425658321107
.YYY.com TRUE / FALSE 1488730321 __gads ID=8edab7af1673d945:T=1425658321:S=ALNI_Ma6b9RCM4Cm7IGSojNoWU5DohhJ0w
www.YYY.com FALSE / FALSE 1457194477 htg_subform_hide 1
I've come across How to send cookies in a post request with the Python Requests library?, but the accepted example:
cookie = {'enwiki_session': '17ab96bd8ffbe8ca58a78657a918558'}
refers to only one field. Each record exported in my file has 7 fields which I assume some of which are
domain , path , expires, Name
What is the best way to import these cookies into python so I can use them with requests?