开发者

How do I manually put cookies in a jar?

开发者 https://www.devze.com 2023-01-26 07:19 出处:网络
I\'m using python with urllib2 & cookielib and such to open a url. This url set\'s one cookie in it\'s header and two more in the page with some javascript. It then redirects to a different page.

I'm using python with urllib2 & cookielib and such to open a url. This url set's one cookie in it's header and two more in the page with some javascript. It then redirects to a different page.

I can parse out all the relevant info for the cookies being set with the javascript, but I can't for the life of me figure out how to get them into the cookie-jar as cookies.

Essentially, when I follow to the site being redirected too, those tw开发者_StackOverflowo cookies have to be accessible by that site.

To be very specific, I'm trying to login in to gomtv.net by using their "login in with a Twitter account" feature in python.

Anyone?


You can't set cookies for another domain - browsers will not allow it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号