Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生成cookies出错 #53

Open
kvenux opened this issue Mar 27, 2018 · 2 comments
Open

生成cookies出错 #53

kvenux opened this issue Mar 27, 2018 · 2 comments

Comments

@kvenux
Copy link

kvenux commented Mar 27, 2018

报错内容:
error, account id [email protected] is not valid, pass this account, you can edit it and then update cookies.

PhantomJS 也装了
MAC\win\云上的linux都是这条错误,上述三台主机IP也不在一个网段
Any suggestions?

@mansonami
Copy link

得不到cookies?我这里也是得不到cookies?

@mansonami
Copy link

微博 - 随时随地发现新鲜事

cookie_list = driver.get_cookies()
cookie_list
[{'domain': '.weibo.cn', 'expires': '周五, 29 6月 2018 13:26:52 GMT', 'expiry': 1530278812, 'httponly': True, 'name': 'M_WEIBOCN_PARAMS', 'path': '/', 'secure': False, 'value': 'uicode%3D20000174'}, {'domain': '.weibo.cn', 'expires': '周五, 29 6月 2018 14:16:52 GMT', 'expiry': 1530281812, 'httponly': False, 'name': 'MLOGIN', 'path': '/', 'secure': False, 'value': '1'}, {'domain': '.weibo.cn', 'expires': '周日, 29 7月 2018 13:16:51 GMT', 'expiry': 1532870211, 'httponly': True, 'name': '_T_WM', 'path': '/', 'secure': False, 'value': 'bf984aa52b074d3163558a73a0e67625'}, {'domain': '.weibo.cn', 'httponly': False, 'name': 'SSOLoginState', 'path': '/', 'secure': False, 'value': '1530278211'}, {'domain': '.weibo.cn', 'expires': '周一, 26 6月 2028 13:16:51 GMT', 'expiry': 1845638211, 'httponly': True, 'name': 'SCF', 'path': '/', 'secure': False, 'value': 'AsCdgSUbLqnKVgir-3l9hqNLaaHZQtaY85hM5eEbWGPRRSurakQcTNSnUJTWHX5RjG2whsfuBPMUq1nmPaSpCjo.'}, {'domain': '.weibo.cn', 'expires': '周六, 29 6月 2019 13:16:51 GMT', 'expiry': 1561814211, 'httponly': False, 'name': 'SUHB', 'path': '/', 'secure': False, 'value': '04W-yBXaNgcdH-'}, {'domain': '.weibo.cn', 'expires': '周六, 29 6月 2019 13:16:51 GMT', 'expiry': 1561814211, 'httponly': True, 'name': 'SUB', 'path': '/', 'secure': False, 'value': '_2A252MkETDeRhGeNL6FMW8y_EwzqIHXVV3W9brDV6PUJbkdAKLVfTkW1NSQOZKBuf7XMhYPXrBGMb5LRbzOqskueb'}]

        cookie_list = driver.get_cookies()
        print(cookie_list)
        cookie_string = ''
        for cookie in cookie_list:
            if 'name' in cookie and 'value' in cookie:
                cookie_string += cookie['name'] + '=' + cookie['value'] + ';'

返回的cookie_list是list,直接用cookie['name']? 谁知道这个地方想得到什么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants