Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Send header because gets 403 if cookie is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
kr4ssi authored Feb 21, 2019
1 parent ed72087 commit 91f3f69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/youtube-dl.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ function processData(data, options, stream) {
// fix for pause/resume downloads
const headers = { 'Host': url.parse(item.url).hostname };

Object.assign(headers, data.http_headers);

if (options && options.start > 0) headers.Range = 'bytes=' + options.start + '-';

const req = request({ url: item.url, headers: headers });
Expand Down

0 comments on commit 91f3f69

Please sign in to comment.