Version 1.9.4

Fix #126
This commit is contained in:
Mattia 2021-05-20 10:21:22 +02:00
parent 297d2ce2a4
commit 721ad7e2d5
4 changed files with 27 additions and 15 deletions

View File

@ -1,3 +1,6 @@
## 1.9.4
- Fix issue #126
## 1.9.3+2 ## 1.9.3+2
- Fix `ChannelUploadsList`. - Fix `ChannelUploadsList`.

View File

@ -54,7 +54,7 @@ class VideoInfoResponse {
[String? sts]) { [String? sts]) {
var eurl = Uri.encodeFull('https://youtube.googleapis.com/v/$videoId'); var eurl = Uri.encodeFull('https://youtube.googleapis.com/v/$videoId');
var url = var url =
'https://youtube.com/get_video_info?video_id=$videoId&el=embedded&eurl=$eurl&hl=en${sts != null ? '&sts=$sts' : ''}'; 'https://youtube.com/get_video_info?video_id=$videoId&el=embedded&eurl=$eurl&hl=en${sts != null ? '&sts=$sts' : ''}&html5=1';
return retry(() async { return retry(() async {
var raw = await httpClient.getString(url); var raw = await httpClient.getString(url);
var result = VideoInfoResponse.parse(raw); var result = VideoInfoResponse.parse(raw);

View File

@ -1,6 +1,6 @@
name: youtube_explode_dart name: youtube_explode_dart
description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key. description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
version: 1.9.3+2 version: 1.9.4
homepage: https://github.com/Hexer10/youtube_explode_dart homepage: https://github.com/Hexer10/youtube_explode_dart
@ -18,7 +18,6 @@ dependencies:
xml: ^5.0.2 xml: ^5.0.2
dev_dependencies: dev_dependencies:
#TODO: Add build_runner when is nnbd
build_runner: ^1.12.2 build_runner: ^1.12.2
console: ^4.0.0 console: ^4.0.0
grinder: ^0.9.0-nullsafety.0 grinder: ^0.9.0-nullsafety.0

View File

@ -48,23 +48,33 @@ void main() {
group('Get specific stream of any playable video', () { group('Get specific stream of any playable video', () {
for (final val in { for (final val in {
VideoId('9bZkp7q19f0'), // very popular VideoId('9bZkp7q19f0'),
// VideoId('SkRSXFQerZs'), // age restricted (embed allowed) - This is unplayable // very popular
VideoId('hySoCSoH-g8'), // age restricted (embed not allowed) VideoId(
VideoId('_kmeFXjjGfk'), // embed not allowed (type 1) 'SkRSXFQerZs'), // age restricted (embed allowed) - This is unplayable
VideoId('MeJVWBSsPAY'), // embed not allowed (type 2) VideoId('hySoCSoH-g8'),
VideoId('5VGm0dczmHc'), // rating not allowed // age restricted (embed not allowed)
VideoId('ZGdLIwrGHG8'), // unlisted VideoId('_kmeFXjjGfk'),
VideoId('rsAAeyAr-9Y'), // recording of a live stream // embed not allowed (type 1)
VideoId('AI7ULzgf8RU'), // has DASH manifest TODO: Test timesout VideoId('MeJVWBSsPAY'),
VideoId('-xNN-bJQ4vI'), // 360° video // embed not allowed (type 2)
VideoId('5VGm0dczmHc'),
// rating not allowed
VideoId('ZGdLIwrGHG8'),
// unlisted
VideoId('rsAAeyAr-9Y'),
// recording of a live stream
VideoId('AI7ULzgf8RU'),
// has DASH manifest
VideoId('-xNN-bJQ4vI'),
// 360° video
}) { }) {
test('VideoId - ${val.value}', () async { test('VideoId - ${val.value}', () async {
var manifest = await yt!.videos.streamsClient.getManifest(val); var manifest = await yt!.videos.streamsClient.getManifest(val);
for (final streamInfo in manifest.streams) { for (final streamInfo in manifest.streams) {
expect(yt!.videos.streamsClient.get(streamInfo), emits(isNotNull)); expect(yt!.videos.streamsClient.get(streamInfo).first, completes);
} }
}); }, timeout: const Timeout(Duration(minutes: 5)));
} }
}); });
} }