Version 1.9.5

See #130
This commit is contained in:
Mattia 2021-06-18 17:14:55 +02:00
parent 721ad7e2d5
commit 561bf3339d
4 changed files with 30 additions and 13 deletions

View File

@ -1,3 +1,6 @@
## 1.9.4
- Temporary for for issue #
## 1.9.4
- Fix issue #126

View File

@ -28,18 +28,18 @@ class PlayerResponse {
String get videoAuthor => root.get('videoDetails')!.getT<String>('author')!;
///
DateTime get videoUploadDate => root
.get('microformat')!
.get('playerMicroformatRenderer')!
.getT<String>('uploadDate')!
.parseDateTime();
DateTime? get videoUploadDate => root
.get('microformat')
?.get('playerMicroformatRenderer')
?.getT<String>('uploadDate')
?.parseDateTime();
///
DateTime get videoPublishDate => root
.get('microformat')!
.get('playerMicroformatRenderer')!
.getT<String>('publishDate')!
.parseDateTime();
DateTime? get videoPublishDate => root
.get('microformat')
?.get('playerMicroformatRenderer')
?.getT<String>('publishDate')
?.parseDateTime();
///
String get videoChannelId =>

View File

@ -53,8 +53,22 @@ class VideoInfoResponse {
YoutubeHttpClient httpClient, String videoId,
[String? sts]) {
var eurl = Uri.encodeFull('https://youtube.googleapis.com/v/$videoId');
var url =
'https://youtube.com/get_video_info?video_id=$videoId&el=embedded&eurl=$eurl&hl=en${sts != null ? '&sts=$sts' : ''}&html5=1';
final url = Uri(
scheme: 'https',
host: 'youtube.com',
path: '/get_video_info',
queryParameters: {
'video_id': videoId,
'el': 'embedded',
'eurl': eurl,
'hl': 'en',
if (sts != null) 'sts': sts,
'html5': '1',
'c': 'TVHTML5',
'cver': '6.20180913'
});
return retry(() async {
var raw = await httpClient.getString(url);
var result = VideoInfoResponse.parse(raw);

View File

@ -1,6 +1,6 @@
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.
version: 1.9.4
version: 1.9.5
homepage: https://github.com/Hexer10/youtube_explode_dart