abdulrahman1s / fem-dl

Frontend Masters Course Downloader That actually works.
https://npmjs.com/package/fem-dl
The Unlicense
164 stars 28 forks source link

Unable to download old courses #6

Closed gladiatorgiftson closed 1 year ago

gladiatorgiftson commented 1 year ago

course : https://frontendmasters.com/courses/css-grid-flexbox-v2/

I have a stable internet connection many courses give me this error

⠙ Downloading 1. Introduction/1. Introduction.mp4 | Chunks: N/A | Remaining: 44/44 node:internal/process/esm_loader:94 internalBinding('errors').triggerUncaughtException( ^ Response { size: 0,

body: PassThrough {
  _readableState: ReadableState {
    objectMode: false,
    highWaterMark: 16384,
    buffer: BufferList { head: null, tail: null, length: 0 },
    length: 0,
    pipes: [],
    flowing: null,
    ended: false,
    endEmitted: false,
    reading: false,
    constructed: true,
    sync: false,
    needReadable: false,
    emittedReadable: false,
    readableListening: false,
    resumeScheduled: false,
    errorEmitted: false,
    emitClose: true,
    autoDestroy: true,
    destroyed: false,
    errored: null,
    closed: false,
    closeEmitted: false,
    defaultEncoding: 'utf8',
    awaitDrainWriters: null,
    multiAwaitDrain: false,
    readingMore: false,
    dataEmitted: false,
    decoder: null,
    encoding: null,
    [Symbol(kPaused)]: null
  },
  _events: [Object: null prototype] {
    prefinish: [Function: prefinish],
    close: [
      [Function (anonymous)],
      [Function: onclose],
      [Function: bound onceWrapper] {
        listener: [Function: onclose]
      }
    ],
    end: [Function: onend],
    finish: [
      [Function: onfinish],
      [Function: bound onceWrapper] {
        listener: [Function: onfinish]
      }
    ],
    error: [
      [Function: onerror],
      [Function: onerror],
      [Function (anonymous)]
    ],
    unpipe: [Function: onunpipe]
  },
  _eventsCount: 6,
  _maxListeners: undefined,
  _writableState: WritableState {
    objectMode: false,
    highWaterMark: 16384,
    finalCalled: false,
    needDrain: false,
    ending: false,
    ended: false,
    finished: false,
    destroyed: false,
    decodeStrings: true,
    defaultEncoding: 'utf8',
    length: 0,
    writing: false,
    corked: 0,
    sync: true,
    bufferProcessing: false,
    onwrite: [Function: bound onwrite],
    writecb: null,
    writelen: 0,
    afterWriteTickInfo: null,
    buffered: [],
    bufferedIndex: 0,
    allBuffers: true,
    allNoop: true,
    pendingcb: 0,
    constructed: true,
    prefinished: false,
    errorEmitted: false,
    emitClose: true,
    autoDestroy: true,
    errored: null,
    closed: false,
    closeEmitted: false,
    [Symbol(kOnFinished)]: []
  },
  allowHalfOpen: true,
  [Symbol(kCapture)]: false,
  [Symbol(kCallback)]: null
},
stream: PassThrough {
  _readableState: ReadableState {
    objectMode: false,
    highWaterMark: 16384,
    buffer: BufferList { head: null, tail: null, length: 0 },
    length: 0,
    pipes: [],
    flowing: null,
    ended: false,
    endEmitted: false,
    reading: false,
    constructed: true,
    sync: false,
    needReadable: false,
    emittedReadable: false,
    readableListening: false,
    resumeScheduled: false,
    errorEmitted: false,
    emitClose: true,
    autoDestroy: true,
    destroyed: false,
    errored: null,
    closed: false,
    closeEmitted: false,
    defaultEncoding: 'utf8',
    awaitDrainWriters: null,
    multiAwaitDrain: false,
    readingMore: false,
    dataEmitted: false,
    decoder: null,
    encoding: null,
    [Symbol(kPaused)]: null
  },
  _events: [Object: null prototype] {
    prefinish: [Function: prefinish],
    close: [
      [Function (anonymous)],
      [Function: onclose],
      [Function: bound onceWrapper] {
        listener: [Function: onclose]
      }
    ],
    end: [Function: onend],
    finish: [
      [Function: onfinish],
      [Function: bound onceWrapper] {
        listener: [Function: onfinish]
      }
    ],
    error: [
      [Function: onerror],
      [Function: onerror],
      [Function (anonymous)]
    ],
    unpipe: [Function: onunpipe]
  },
  _eventsCount: 6,
  _maxListeners: undefined,
  _writableState: WritableState {
    objectMode: false,
    highWaterMark: 16384,
    finalCalled: false,
    needDrain: false,
    ending: false,
    ended: false,
    finished: false,
    destroyed: false,
    decodeStrings: true,
    defaultEncoding: 'utf8',
    length: 0,
    writing: false,
    corked: 0,
    sync: true,
    bufferProcessing: false,
    onwrite: [Function: bound onwrite],
    writecb: null,
    writelen: 0,
    afterWriteTickInfo: null,
    buffered: [],
    bufferedIndex: 0,
    allBuffers: true,
    allNoop: true,
    pendingcb: 0,
    constructed: true,
    prefinished: false,
    errorEmitted: false,
    emitClose: true,
    autoDestroy: true,
    errored: null,
    closed: false,
    closeEmitted: false,
    [Symbol(kOnFinished)]: []
  },
  allowHalfOpen: true,
  [Symbol(kCapture)]: false,
  [Symbol(kCallback)]: null
},
boundary: null,
disturbed: false,
error: null

},

type: 'default',
url: 'https://stream.frontendmasters.com/2021/10/26/ePdSMfagcI/nrxyGtRpmz/index_2160p_Q10_20mbps.m3u8',
status: 403,
statusText: 'Forbidden',
headers: Headers {
  [Symbol(query)]: [
    'access-control-allow-credentials',
    'true',
    'access-control-allow-methods',
    'GET',
    'access-control-allow-origin',
    'https://frontendmasters.com',
    'access-control-max-age',
    '3000',
    'connection',
    'close',
    'content-type',
    'application/xml',
    'date',
    'Thu, 06 Oct 2022 04:21:12 GMT',
    'server',
    'AmazonS3',
    'transfer-encoding',
    'chunked',
    'vary',
    'Origin,Access-Control-Request-Headers,Access-Control-Request-Method',
    'via',
    '1.1 b29e77b539ee60c59c6b595481ca2fdc.cloudfront.net (CloudFront)',
    'x-amz-cf-id',
    'kBgl7Ov8KpA1e3LPqRiexZQRBf5aXsGgwk0Gv2PyICfk2UohF_wmcg==',
    'x-amz-cf-pop',
    'MAA50-C2',
    'x-cache',
    'Error from cloudfront'
  ],
  [Symbol(context)]: null
},
counter: 0,
highWaterMark: 16384

} }

gladiatorgiftson commented 1 year ago

@abdulrahman1s i got the issue can the code be modified if the selected resolution is not available can it be fallback to next resolution

abdulrahman1s commented 1 year ago

Fixed, v0.1.2 release notes