开发者

How do I manually put cookies in a jar?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜