Fix SearchVideo
See https://github.com/Tyrrrz/YoutubeExplode/issues/438
This commit is contained in:
parent
105748fc7c
commit
c962c1999e
|
@ -3,6 +3,9 @@
|
||||||
- Only throw custom exceptions from the library.
|
- Only throw custom exceptions from the library.
|
||||||
- `getUploadsFromPage` no longer throws.
|
- `getUploadsFromPage` no longer throws.
|
||||||
|
|
||||||
|
## 1.5.1
|
||||||
|
- Fix Video Search: https://github.com/Tyrrrz/YoutubeExplode/issues/438
|
||||||
|
|
||||||
## 1.5.0
|
## 1.5.0
|
||||||
- BREAKING CHANGE: Renamed `Container` class to `StreamContainer` to avoid conflicting with Flutter `Container`. See #66
|
- BREAKING CHANGE: Renamed `Container` class to `StreamContainer` to avoid conflicting with Flutter `Container`. See #66
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,12 @@ class PlaylistResponse {
|
||||||
var url = 'https://youtube.com/search_ajax?style=json&search_query='
|
var url = 'https://youtube.com/search_ajax?style=json&search_query='
|
||||||
'${Uri.encodeQueryComponent(query)}&page=$page&hl=en';
|
'${Uri.encodeQueryComponent(query)}&page=$page&hl=en';
|
||||||
return retry(() async {
|
return retry(() async {
|
||||||
var raw = await httpClient.getString(url, validate: false);
|
var raw = await httpClient.getString(url,
|
||||||
|
validate: false,
|
||||||
|
headers: const {
|
||||||
|
'x-youtube-client-name': '56',
|
||||||
|
'x-youtube-client-version': '20200911'
|
||||||
|
});
|
||||||
return PlaylistResponse.parse(raw);
|
return PlaylistResponse.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.5.0
|
version: 1.5.1
|
||||||
homepage: https://github.com/Hexer10/youtube_explode_dart
|
homepage: https://github.com/Hexer10/youtube_explode_dart
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in New Issue