parent
721ad7e2d5
commit
561bf3339d
|
@ -1,3 +1,6 @@
|
||||||
|
## 1.9.4
|
||||||
|
- Temporary for for issue #
|
||||||
|
|
||||||
## 1.9.4
|
## 1.9.4
|
||||||
- Fix issue #126
|
- Fix issue #126
|
||||||
|
|
||||||
|
|
|
@ -28,18 +28,18 @@ class PlayerResponse {
|
||||||
String get videoAuthor => root.get('videoDetails')!.getT<String>('author')!;
|
String get videoAuthor => root.get('videoDetails')!.getT<String>('author')!;
|
||||||
|
|
||||||
///
|
///
|
||||||
DateTime get videoUploadDate => root
|
DateTime? get videoUploadDate => root
|
||||||
.get('microformat')!
|
.get('microformat')
|
||||||
.get('playerMicroformatRenderer')!
|
?.get('playerMicroformatRenderer')
|
||||||
.getT<String>('uploadDate')!
|
?.getT<String>('uploadDate')
|
||||||
.parseDateTime();
|
?.parseDateTime();
|
||||||
|
|
||||||
///
|
///
|
||||||
DateTime get videoPublishDate => root
|
DateTime? get videoPublishDate => root
|
||||||
.get('microformat')!
|
.get('microformat')
|
||||||
.get('playerMicroformatRenderer')!
|
?.get('playerMicroformatRenderer')
|
||||||
.getT<String>('publishDate')!
|
?.getT<String>('publishDate')
|
||||||
.parseDateTime();
|
?.parseDateTime();
|
||||||
|
|
||||||
///
|
///
|
||||||
String get videoChannelId =>
|
String get videoChannelId =>
|
||||||
|
|
|
@ -53,8 +53,22 @@ class VideoInfoResponse {
|
||||||
YoutubeHttpClient httpClient, String videoId,
|
YoutubeHttpClient httpClient, String videoId,
|
||||||
[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 =
|
|
||||||
'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 {
|
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);
|
||||||
|
|
|
@ -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.4
|
version: 1.9.5
|
||||||
|
|
||||||
homepage: https://github.com/Hexer10/youtube_explode_dart
|
homepage: https://github.com/Hexer10/youtube_explode_dart
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue