Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(yt): add support for movie items and trailers #349

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

patrickkfkan
Copy link
Contributor

  1. Add GridMovie and HorizontalMovieList parsers for movie-related elements (easy to find them in Explore -> Films)
  2. Add PlayerLegacyDesktopYpcTrailer and YpcTrailer parsers for trailer info that appear in errorScreen of /player reponse, typically when viewing a non-purchased movie or film.
  3. Add getTrailerInfo() and has_trailer getter to VideoInfo, which uses data from the parsers in (2) above. Usage:
const info = youtube.getInfo(video_id);

if (info.has_trailer) {
  const trailer_info = info.getTrailerInfo();  // Returns `VideoInfo` instance
  const format = trailer_info.chooseFormat(...);
  ...
}

@LuanRT LuanRT merged commit 9f1c31d into LuanRT:main Mar 12, 2023
@patrickkfkan patrickkfkan deleted the movie branch October 22, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants