Skip to content

Commit e87e283

Browse files
committed
fix(douyin): 修复视频下载请求头错误并更新分享链接请求头
使用douyinBaseHeaders替换this.headers以确保请求头一致性 为视频下载添加必要的请求头参数
1 parent 395593a commit e87e283

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

module/platform/douyin/push.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class DouYinpush extends Base {
174174
const realUrl = Config.douyin?.push?.shareType === 'web' && await new Networks({
175175
url: Detail_Data.share_url,
176176
headers: {
177-
...this.headers,
177+
...douyinBaseHeaders,
178178
Referer: 'https://www.douyin.com',
179179
Cookie: ''
180180
}
@@ -252,7 +252,12 @@ export class DouYinpush extends Base {
252252
// 下载视频
253253
await downloadVideo(this.e, {
254254
video_url: downloadUrl,
255-
title: { timestampTitle: `tmp_${Date.now()}.mp4`, originTitle: `${Detail_Data.desc}.mp4` }
255+
title: { timestampTitle: `tmp_${Date.now()}.mp4`, originTitle: `${Detail_Data.desc}.mp4` },
256+
headers: {
257+
...douyinBaseHeaders,
258+
Referer: downloadUrl,
259+
Cookie: ''
260+
}
256261
}, { active: true, activeOption: { uin: botId, group_id: groupId } })
257262
} catch (error) {
258263
logger.error(error)

0 commit comments

Comments
 (0)