[ Python requests recontruct cookie information from the browser ]
I have to make a http requests using my cookie information as the current web application does not have a api exposed for me to get the data.
MCHALLENGE=CHALLENGE_DONE; ipServerp_grandslam2e_80=82712748.20480.0000; __ca=P0-361438119-1454365384599; s_getNewRepeat=1454365384951-New; s_lv=1454365384953; s_vnum=1456808400955%26vn%3D1; s_cc=true; s_fid=24C5BAE937778C2F-2319CF2297558C5F; s_sq=%5B%5BB%5D%5D; MSESSION=nrtLGo9j+11CNQliPTsj3GnXW7YGEl7RmO2DZLHF6EvgoerYioMu162++fUVZFKRuXo8ntcJdwEg7qijbLecxyKDxN4QWUUPppPXnF+wP+JcDsJG6djuQ2DkOUOUOzPvP9pU4ZXEiWRDJsH8Vlk2Zg442aE2eyyJ0fV7K02cweLbKF0D/sDBu919tc6+0Y4TjV0yxCDeyFuk+if2TNworWjaMass6HIQvGGWx2kNPf7jPe+dRjfdK+6DDtdWQNawgloC4bt5EEte5a2mkzY6O6+vC5pjEHjnT3EFAtxLsabQExX2Ab7hcjUz/tXkqqRwJh2X2cvtpD8utpDobniyfhToxfg++eblfy0QzgTvwefgJGqAcrcxyKEf6btl3mjzpT/qtElFiJCo0SvN3cai5/Vf6+/7DZD89aEV0uEvQp95IUcSuDlSTbfoTjt6sX9h2D+jHr2tDGcXueSrN029c2JQZ7v9CLFXbecHtdrSKWfM6MYLv7QsjKFIUmCT0prmdOZmZ+rTWFiUKXRGNC2BA6kR4165UjeY0BQXa6XOrfmMJux9LaUKIym4OvlltH+5S+5KQPtzvjP96mBVWqdNPZokReQY5QxZ3ztGR/tyh4+fnLTQyXhRBH/jLmqNdZoCwhRFJfHj9qqgi3J0dcKAIMiGj06XrrqeN4zF/kQ2qCw7c1UL9DQ70qHP65ggM4FgfKkX0WHLJrwandi9K8iYavGE4YkENfLb0CFXOtFN1ekdBlaikAdez2WEs/TMjY1Ei9x9pYI7ht+3exUb0wWhIgwVv1myWAhkUGPIL1PS7mi+A6tWMPpidl4zlTAvY/YJdZJOQW7gD7uI+AAz4ucm3A7VBdtfOe/PRlylHg9+xOJjIqmVKa1e4zzM/yvOSpYu9AL8Qkxe4Bvn7GHq+94ZXG8rC+4410/DLns+16dDoOBI6G/nOBjavVe3X+qgcvvFi8K8GDp/xdBXz9eUDEzPcrRuU28y7ccKPmvakmRPwutjQDdNA0iP8KoJtrVrpih9EP5P1l+NpNJHnLn/CW9RSsDJuMLfMuelaEO7eVL+q91t3HG0pebZ/utYMyHxLI1fCEpXDdYC8IBObaNCJylFRL80l59GviefcYdfMQjSWemhVvEBelGl77zNx+7FdZs/wtLVCOxaDaif2TdW6LO5hvTIHeXOsdKtMykitBXYXtecZJbyLHW3kBGDiOT2qDyhiWIIWspvQZaNHuj9PSzWPIq7/tDTxdQ4+qskd+LDWGcB2LinFt0j/LOpsTjZRZ80RaVQloFAigaMJkp8Q3VPFJksbkMofBcYmC8dFlSQCW65pn4fypsLDb5HibroD0pshQeaaid1AZ8iVZlwdBMlk27LGU8TtGhfEAwtNeQbA32knTSixq3jAIq/+ysZ1+pitn+GzmtLFjqBMBANfiFWQAQiYIjaED6c3wHtkzoBVAx3MYrb+keNIeNc1+744cfNx+wTTwAzelKvhVT3CgECccXze1UKbUQZ; JSessionID=zjPJWyLMspYZgQz02B42FnDv3QCPv1v57wLR768kCrrd48Dtm21F!-223451482; CTICookie=a9a17649-55b7-475a-81df-06f715b50695=true&1eb9e01a-2ff7-405b-b319-ae2b839ecee8=true&f4052f95-9686-4aac-a959-50e6a2e2b8dd=true; SiteminderUserInfo=SiteminderUserId=p7c&SiteminderUserGUID=45ec3b6f-6378-480c-8c5b-2be29cbbc9fd; DRUM_BT1=R:43|i:7917|e:529; DRUM_BT=R:43|g:aecc35e8-9ce2-4f21-8957-944f5bd4334e
Here is the cookie string thats been passed.
How can I reconstruct the same information using Python dictionary to be passed using python requests module.
Answer 1
data = dict(s.split("=") for s in my_cookie_string.split(";"))
I guess ... maybe?