Skip to content

Commit

Permalink
Merge pull request #28 from Kabuda-czh/fix-bilibili-352
Browse files Browse the repository at this point in the history
🐞 fix: loss ua -> get -352
  • Loading branch information
Kabuda-czh authored May 25, 2023
2 parents e355d17 + 8ecbcb3 commit c8c3767
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/kbot/src/plugins/bilibili/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: Kabuda-czh
* @Date: 2023-01-29 14:43:27
* @LastEditors: Kabuda-czh
* @LastEditTime: 2023-05-04 10:19:09
* @LastEditTime: 2023-05-25 12:51:14
* @FilePath: \KBot-App\plugins\kbot\src\plugins\bilibili\index.ts
* @Description:
*
Expand Down Expand Up @@ -57,7 +57,7 @@ export async function apply(context: Context, config: IConfig) {
ctx.http = context.http.extend({
headers: {
'User-Agent':
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36',
...config.quester.headers,
},
...config.quester,
Expand Down
5 changes: 3 additions & 2 deletions plugins/kbot/src/plugins/bilibili/utils/biliRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: Kabuda-czh
* @Date: 2023-02-03 16:34:11
* @LastEditors: Kabuda-czh
* @LastEditTime: 2023-04-06 11:09:37
* @LastEditTime: 2023-05-25 12:49:58
* @FilePath: \KBot-App\plugins\kbot\src\plugins\bilibili\utils\biliRequest.ts
* @Description:
*
Expand All @@ -20,7 +20,8 @@ export async function getDynamic(http: Quester, uid: string) {
StringFormat(BilibiliDynamicType.DynamicDetailURL, uid),
{
headers: {
Referer: `https://space.bilibili.com/${uid}/dynamic`,
'Referer': `https://space.bilibili.com/${uid}/dynamic`,
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36',
},
},
)
Expand Down

0 comments on commit c8c3767

Please sign in to comment.