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站转发卡片BUG #1249

Merged
merged 1 commit into from
Feb 5, 2023
Merged

修复B站转发卡片BUG #1249

merged 1 commit into from
Feb 5, 2023

Conversation

noahzark
Copy link
Contributor

  1. 最新URL https://b23.tv/nz4tMtX 返回
HTTP/2 301 
date: Tue, 31 Jan 2023 09:43:07 GMT
content-type: text/html; charset=utf-8
content-length: 781
set-cookie: ******; path=/; expires=Mon, 27 Oct 2025 09:43:07 GMT; domain=.bilibili.com
set-cookie: b_nut=1675158187; path=/; expires=Wed, 31 Jan 2024 09:43:07 GMT; domain=.bilibili.com
location: /video/BV1CM4y197A4/?buvid=******
vary: Origin,Accept-Encoding
idc: shjd
x-cache-webcdn: BYPASS from blzone07

这时候 url 会变成 /video/BV1CM4y197A4/ 需要去除末尾的/来提取BVID

  1. 某些转发(比如ios客户端)目前QQ小程序的desc为空,需要在prompt里检测
[CQ:json,data={"app":"com.tencent.miniapp_01","appID":"100951776","bthirdappforward":true,"bthirdappforwardforbackendswitch":true,"config":{"autoSize":0,"ctime":1675159871,"forward":1,"height":0,"token":"d1dda06f69b12d511972e87ec49b2a19","type":"normal","width":0},"desc":"","extra":{"app_type":1,"appid":100951776,"uin":28696786},"meta":{"detail_1":{"appType":0,"appid":"1109937557","desc":"网络中挖到国防光缆vs现实","gamePoints":"","gamePointsUrl":"","host":{"nick":"Noahzark","uin":28696786},"icon":"http://miniapp.gtimg.cn/public/appicon/432b76be3a548fc128acaa6c1ec90131_200.jpg","preview":"https://pic.ugcimg.cn/07cc5adddb5e6ef3cc27326a12b2df17/jpg1","qqdocurl":"https://b23.tv/******","scene":1036,"shareTemplateData":{},"shareTemplateId":"8C8E89B49BE609866298ADDFF2DBABA4","showLittleTail":"","title":"哔哩哔哩","url":"m.q.qq.com/a/s/f6362a996fd107b3d4dbedce09c17d92"}},"prompt":"[QQ小程序]哔哩哔哩","ver":"1.0.1.42","view":"view_8C8E89B49BE609866298ADDFF2DBABA4"}]

1. 最新URL `https://b23.tv/nz4tMtX`
返回
```
HTTP/2 301 
date: Tue, 31 Jan 2023 09:43:07 GMT
content-type: text/html; charset=utf-8
content-length: 781
set-cookie: ******; path=/; expires=Mon, 27 Oct 2025 09:43:07 GMT; domain=.bilibili.com
set-cookie: b_nut=1675158187; path=/; expires=Wed, 31 Jan 2024 09:43:07 GMT; domain=.bilibili.com
location: /video/BV1CM4y197A4/?buvid=******
vary: Origin,Accept-Encoding
idc: shjd
x-cache-webcdn: BYPASS from blzone07
```

这时候 url 会变成 `/video/BV1CM4y197A4/` 需要去除末尾的/来提取BVID

2. 某些转发(比如ios客户端)目前QQ小程序的desc为空,需要在prompt里检测
```json
[CQ:json,data={"app":"com.tencent.miniapp_01"&HibiKier#44;"appID":"100951776"&HibiKier#44;"bthirdappforward":true&HibiKier#44;"bthirdappforwardforbackendswitch":true&HibiKier#44;"config":{"autoSize":0&HibiKier#44;"ctime":1675159871&HibiKier#44;"forward":1&HibiKier#44;"height":0&HibiKier#44;"token":"d1dda06f69b12d511972e87ec49b2a19"&HibiKier#44;"type":"normal"&HibiKier#44;"width":0}&HibiKier#44;"desc":""&HibiKier#44;"extra":{"app_type":1&HibiKier#44;"appid":100951776&HibiKier#44;"uin":28696786}&HibiKier#44;"meta":{"detail_1":{"appType":0&HibiKier#44;"appid":"1109937557"&HibiKier#44;"desc":"网络中挖到国防光缆vs现实"&HibiKier#44;"gamePoints":""&HibiKier#44;"gamePointsUrl":""&HibiKier#44;"host":{"nick":"Noahzark"&HibiKier#44;"uin":28696786}&HibiKier#44;"icon":"http://miniapp.gtimg.cn/public/appicon/432b76be3a548fc128acaa6c1ec90131_200.jpg","preview":"https://pic.ugcimg.cn/07cc5adddb5e6ef3cc27326a12b2df17/jpg1","qqdocurl":"https://b23.tv/******","scene":1036,"shareTemplateData":{},"shareTemplateId":"8C8E89B49BE609866298ADDFF2DBABA4","showLittleTail":"","title":"哔哩哔哩","url":"m.q.qq.com/a/s/f6362a996fd107b3d4dbedce09c17d92"}},"prompt":"[QQ小程序]哔哩哔哩","ver":"1.0.1.42","view":"view_8C8E89B49BE609866298ADDFF2DBABA4"}]
```
@HibiKier HibiKier merged commit 4d133ed into HibiKier:main Feb 5, 2023
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.

2 participants