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

[YouTube] Support live URLs #1022

Merged
merged 2 commits into from
Jan 28, 2023
Merged

Conversation

AudricV
Copy link
Member

@AudricV AudricV commented Jan 28, 2023

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe. I didn't tested in the app but added tests in the extractor. As LinkHandler tests still pass with my non-breaking API changes, everything should work fine in the app.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API. This pull request will only require support for opening YouTube's /live/ links from external apps, as the extractor update will be done in a separate PR.

This pull request adds support for YouTube's live URLs, which are in the form https://www.youtube.com/live/LIVE_ID, where LIVE_ID is the video ID of the livestream. This behavior applies to past, planned and running livestreams.

Note that these URLs are then transformed to watch URLs in the address bar with the desktop client once the watch page has been loaded.

I also added a test for these live URLs and did minor improvements to the files changed (see the commits for details).

This pull request is the extractor part of TeamNewPipe/NewPipe#9546.

@AudricV AudricV added enhancement youtube service, https://www.youtube.com/ labels Jan 28, 2023
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a small question

…mLinkHandlerFactory

- Move license header at the top;
- Use an unmodifiable set for the subpaths instead of a modifiable list;
- Add missing Nonnull and Nullable annotations;
- Improve exception messages.
…amLinkHandlerFactoryTest

- Remove unused imports;
- Replace wildcard imports by single class imports;
- Suppress "HTTP links are not secured" warnings from IDEA IDEs;
- Replace removed video jZViOEv90dI by an existing video, 9Dpqou5cI08 (the
corresponding test has been of course renamed).
@TobiGr TobiGr merged commit 0e4e6a9 into TeamNewPipe:dev Jan 28, 2023
@AudricV AudricV deleted the yt_support-live-urls branch January 28, 2023 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants