Skip to content

Commit

Permalink
Use the pypi index version of browser_cookie3 in requirements.txt
Browse files Browse the repository at this point in the history
Also fix the issue mentioned in 914a03f#r150866017
  • Loading branch information
songzy12 committed Jan 2, 2025
1 parent c34fcdc commit eb3452d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ lxml==4.9.1
requests==2.32.0
tqdm==4.66.3
absl-py==0.12.0
git+https://github.com/borisbabic/browser_cookie3.git@refs/pull/215/head
browser_cookie3==0.20.1
2 changes: 1 addition & 1 deletion weibo_spider/config_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def check_cookie(user_config_file_path):
"""Checks if user is logged in"""
try:
cookie = get_cookie()
if cookie["MLOGIN"] == '0':
if cookie.get("MLOGIN", '0') == '0':
logger.warning("使用 Chrome 在此登录 %s", "https://passport.weibo.com/sso/signin?entry=wapsso&source=wapssowb&url=https://m.weibo.cn/")
sys.exit()
else:
Expand Down

0 comments on commit eb3452d

Please sign in to comment.