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

独立 bilibili-live 的 SchedConf #473

Merged
merged 6 commits into from
Mar 19, 2024
Merged

独立 bilibili-live 的 SchedConf #473

merged 6 commits into from
Mar 19, 2024

Conversation

AzideCupric
Copy link
Collaborator

@AzideCupric AzideCupric commented Feb 9, 2024

与B站动态不同,B站直播使用的是另一个api,并且对直播的查询频率应该更高(api也没有相应限制

Copy link

netlify bot commented Feb 9, 2024

Deploy Preview for nonebot-bison ready!

Name Link
🔨 Latest commit c9f171f
🔍 Latest deploy log https://app.netlify.com/sites/nonebot-bison/deploys/65f83915d458a70008076f98
😎 Deploy Preview https://deploy-preview-473--nonebot-bison.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AzideCupric AzideCupric force-pushed the feat/bililive-schedconf branch 2 times, most recently from a3993f3 to f5097a7 Compare February 19, 2024 17:06
_client_refresh_time: datetime
cookie_expire_time = timedelta(hours=5)

bili_http_client = http_client()
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个地方 client 是统一了,但是 _init_session 和 _refresh_client 的逻辑还是分开的,创建出来的 两个 SchedConf 自己维护自己的 refresh_time,判断要不要 refresh,这部分能不能合并到一起

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

_client_refresh_time不是类属性吗 应该是共用的吧
(不过似乎也不应该在__init__里给他初值,这样就赋值了两次

Copy link
Collaborator

Choose a reason for hiding this comment

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

这样吧,把 refresh_time, client, _init_session, _refresh_client 都包在一个新的 class 里,只暴露 get 这个方法

@felinae98
Copy link
Collaborator

rebase 一下?codecov 应该对了

@AzideCupric
Copy link
Collaborator Author

rebase 一下?codecov 应该对了

rebase 了

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.47%. Comparing base (a6a2cc1) to head (c9f171f).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #473      +/-   ##
==========================================
+ Coverage   83.35%   83.47%   +0.11%     
==========================================
  Files          78       78              
  Lines        3503     3516      +13     
==========================================
+ Hits         2920     2935      +15     
+ Misses        583      581       -2     
Flag Coverage Δ
smoke-test 83.47% <100.00%> (+0.11%) ⬆️

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 felinae98 added the enhancement New feature or request label Mar 19, 2024
@felinae98 felinae98 changed the title ✨ 独立 bilibili-live 的 SchedConf 独立 bilibili-live 的 SchedConf Mar 19, 2024
@felinae98 felinae98 merged commit c96dd85 into main Mar 19, 2024
30 of 34 checks passed
@felinae98 felinae98 deleted the feat/bililive-schedconf branch March 19, 2024 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants