Hexer10 / youtube_explode_dart

Dart library to interact with many Youtube APIs
https://pub.dev/packages/youtube_explode_dart
BSD 3-Clause "New" or "Revised" License
299 stars 122 forks source link

How to download member-only videos #264

Closed WayneChou1 closed 9 months ago

WayneChou1 commented 9 months ago

Describe the bug I got an error when trying to download the member-only video

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: VideoUnplayableException: Video 'mv1ciWnFlPM' is unplayable. Streams are not available for this video. In most cases, this error indicates that there are some restrictions in place that prevent watching this video. Reason: Join this channel from your computer or Android app to get access to members-only content like this video.

0 StreamClient._getStreams (package:youtube_explode_dart/src/videos/streams/stream_client.dart:155:7)

#1 Stream.toList. (dart:async/stream.dart:1343:9)

To Reproduce

YoutubeHttpClient client = YoutubeHttpClient();
YoutubeExplode yt = YoutubeExplode(client);
yt.videos.get(url).then((video) {
    Logger().d('download video info:${video.toString()}');
     yt.videos.streamsClient.getManifest(video.id).then((manifest) {
          var stream = manifest.muxed.withHighestBitrate();
          downloadStream(yt, video, StreamType.video,singleStream: stream);
      });
});

Enviroment: (please complete the following information):

What should I do if want to download a member-only video?

WayneChou1 commented 9 months ago

Pelase try this url https://youtu.be/mv1ciWnFlPM?si=xge5GDca-5jrkTWj

Hexer10 commented 9 months ago

If you are not able to view the video from the browser (without being a member of that channel), there is no way the library can access it.