Merge branch 'master' into json-types

This commit is contained in:
Mattia 2020-10-17 15:04:42 +02:00 committed by GitHub
commit 150d752df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 9 deletions

12
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: hexah
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@ -3,16 +3,23 @@
- Only throw custom exceptions from the library.
- `getUploadsFromPage` no longer throws.
## 1.15.2
- Fix extraction for same videos (#76)
## 1.5.1
## 1.6.0
- BREAKING CHANGE: Renamed `getVideosAsync` to `getVideos`.
- Implemented `getVideosFromPage` which supersedes `queryFromPage`.
- Implemented JSON Classes for reverse engineer.
- Added `forceWatchPage` to the video client to assure the fetching of the video page. (ATM useful only if using the comments api)
- Remove adaptive streams. These are not used anymore.
- Remove adaptive streams. These are not used anymore.
- Implement `channelClient.getAboutPage` and `getAboutPageByUsername` to fetch data from a channel's about page.
## 1.15.2
- Fix extraction for same videos (#76)
## 1.5.2
- Fix extraction for same videos (#76)
## 1.5.1
- Fix Video Search: https://github.com/Tyrrrz/YoutubeExplode/issues/438
## 1.5.0
- BREAKING CHANGE: Renamed `Container` class to `StreamContainer` to avoid conflicting with Flutter `Container`. See #66

View File

@ -67,7 +67,12 @@ class PlaylistResponse {
var url = 'https://youtube.com/search_ajax?style=json&search_query='
'${Uri.encodeQueryComponent(query)}&page=$page&hl=en';
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);
});
}

View File

@ -29,9 +29,9 @@ void main() {
var trackInfo = manifest.getByLanguage('en');
var track = await yt.videos.closedCaptions.get(trackInfo);
var caption =
track.getByTime(const Duration(hours: 0, minutes: 10, seconds: 41));
track.getByTime(const Duration(hours: 0, minutes: 13, seconds: 22));
var captionPart =
caption.getPartByTime(const Duration(milliseconds: 650));
caption.getPartByTime(const Duration(milliseconds: 200));
expect(caption, isNotNull);
expect(captionPart, isNotNull);