DominicMaas / youtube-extractor

YouTube stream extractor library for Dart. Based on YouTubeExplode by Tyrrrz.
MIT License
85 stars 27 forks source link

403 Status Code #10

Closed BlackBelt2817 closed 5 years ago

BlackBelt2817 commented 5 years ago

I am getting a 403 error on many videos, such as "5_x2jBT6jtE."

  HttpClient client = HttpClient();
  var audioInfo = await extractor.getMediaStreamsAsync('5_x2jBT6jtE');

  var songReq = await client.getUrl(Uri.parse(audioInfo.audio.first.url));
  var songRes = await songReq.close();
  var songBytes = await consolidateHttpClientResponseBytes(songRes);

  print(songRes.statusCode); // 403
  print(songRes.reasonPhrase); // Forbidden

Am I requesting the bytes incorrectly? I am able to see the audio URLs, I am just not able to get a bytes response.

DominicMaas commented 5 years ago

There may have been an issue with the version you were using, could you try again with the latest?