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

✨优化 B站 Cookie 选择策略 #664

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

suyiiyii
Copy link
Contributor

实现了「在失败之前一直使用一个 Cookie」的策略

Copy link

netlify bot commented Dec 12, 2024

👷 Deploy request for nonebot-bison pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit c740ace

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 75.75758% with 8 lines in your changes missing coverage. Please review.

Project coverage is 85.00%. Comparing base (f35c6c2) to head (c740ace).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
nonebot_bison/platform/bilibili/scheduler.py 80.64% 6 Missing ⚠️
nonebot_bison/utils/site.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
- Coverage   85.24%   85.00%   -0.25%     
==========================================
  Files          97       97              
  Lines        5490     5520      +30     
==========================================
+ Hits         4680     4692      +12     
- Misses        810      828      +18     
Flag Coverage Δ
smoke-test 85.00% <75.75%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@felinae98
Copy link
Collaborator

@suyiiyii /rebase

@suyiiyii suyiiyii force-pushed the feat/bilibili-cookie branch from a5b3fb8 to d6e7acf Compare December 17, 2024 03:18
@suyiiyii suyiiyii force-pushed the feat/bilibili-cookie branch from 6c6a35c to 1031e9f Compare December 24, 2024 14:13

return _response_hook

async def _get_next_user_cookie(self) -> CookieModel | None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
async def _get_next_user_cookie(self) -> CookieModel | None:
async def _get_next_identified_cookie(self) -> CookieModel | None:

return _response_hook

async def _get_next_user_cookie(self) -> CookieModel | None:
"""选择下一个用户 cookie"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""选择下一个用户 cookie"""
"""选择下一个实名 cookie"""

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

Successfully merging this pull request may close these issues.

3 participants