1
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-10-06 00:23:15 +02:00

2240 Commits

Author SHA1 Message Date
Stypox
8dfb0d3249 Merge pull request #1361 from AudricV/yt_premieres-lockups-support 2025-10-05 15:19:05 +02:00
Stypox
97957250aa Address review comments 2025-10-05 14:13:46 +02:00
Stypox
393e811470 Wrap LocalDateTime.parse in try-catch 2025-10-05 13:53:10 +02:00
Stypox
3c404e575a [YouTube] Add custom mock tests for Premiere StreamInfoItems
The JSON data for these tests was obtained manually.
2025-10-05 13:48:48 +02:00
Stypox
e50f499797 [YouTube] Return orignial text date in lockupViewModels premieres 2025-10-05 13:44:23 +02:00
Stypox
9b98978fc1 Add testContentAvailability(), fix missing methods in test interfaces 2025-10-04 15:47:10 +02:00
Stypox
ffbdfafe85 Add ContentAvailability.Unknown, add Nonnull, fix typos 2025-10-04 15:27:59 +02:00
FineFindus
11bbdfee99 [YouTube] Use iterators to check for members-only content 2025-10-04 15:05:54 +02:00
FineFindus
737a4ffcf1 Move ContentAvailability to separate file 2025-10-04 15:05:54 +02:00
FineFindus
e2782bfe52 Add comment that ContentAvailability may not reflect actual availability 2025-10-04 15:05:54 +02:00
FineFindus
cc8edec341 Allow checking for ContentAvailability
Adds a new field to `StreamInfoItem` to denote the availability of the
stream. A stream may be restricted to only certain user groups or times.

This allows users to ignore the stream based on their availability, e.g.
a app may choose to hide all streams that require payment.
2025-10-04 15:05:54 +02:00
FineFindus
51a247b059 [YouTube] add JDoc for membership functions 2025-10-04 15:05:54 +02:00
FineFindus
0da22a962a [YouTube] add test for membersOnly playlist 2025-10-04 15:05:54 +02:00
FineFindus
1b6907ec03 [Youtube] Mark members-only videos
YouTube inserts members-only videos (i.e., videos that require channel
membership to watch) into the Videos tab. Because the extractor unable
to distinguish between them and "normal" videos, they may appear in
subscriptions feeds.
This enables the extractor to check if videos require membership,
allowing clients to filter them.

Ref: https://github.com/TeamNewPipe/NewPipe/issues/12040
Ref: https://github.com/TeamNewPipe/NewPipe/issues/12011
2025-10-04 15:05:53 +02:00
Stypox
ac500b6cd8 Revert "Remove redundant initialization"
This reverts commit ea00238df6.

It's not so bad to make it explicit which value we are initializing fields to; @ Stypox's fault for not noticing during review ;-)
2025-10-04 15:04:57 +02:00
David Asunmo
25113b2453 Minor refactoring in Stream.java 2025-10-02 14:50:11 +02:00
David Asunmo
5066141be0 CamelCase typo 2025-10-02 14:50:11 +02:00
David Asunmo
73d93f8315 List.of IDE suggestions refactoring 2025-10-02 14:50:10 +02:00
David Asunmo
93328a38e6 Refactor AudioStream constructor to use builder instead of explicit parameters. Refactor documentation also 2025-10-02 14:48:42 +02:00
David Asunmo
05d951b2fc Remove matchNamedGroup methods from Parser.java as not available on Android API < 26 2025-10-02 14:48:42 +02:00
David Asunmo
ea00238df6 Remove redundant initialization 2025-10-02 14:48:42 +02:00
David Asunmo
ffb7c48e8a Refactor Description constructor 2025-10-02 14:48:42 +02:00
David Asunmo
89dab90aa7 [SoundCloud] Use Pattern instead of string for regex in SoundcloudStreamLinkHandlerFactory
Use non-capturing groups in regex
Refactor Parser.java
Add more utility methods (will be used in later commits)
2025-10-02 14:48:42 +02:00
David Asunmo
8114af4c01 [Localization] Add toString to DateWrapper for better debugging 2025-10-02 14:48:42 +02:00
David Asunmo
41b77ef2ac Fix typo 2025-10-02 14:48:42 +02:00
David Asunmo
5fcd97104c [SoundCloud] SoundCloudStreamExtractor.getTimeStamp return 0 if no timestamp in url 2025-10-02 14:48:42 +02:00
David Asunmo
d9af459ecf Remove redundant override 2025-10-02 14:48:42 +02:00
David Asunmo
5e7818cd84 Fix typo 2025-10-02 14:48:41 +02:00
dependabot[bot]
21b254fa94 Bump protobufVersion from 4.32.0 to 4.32.1
Bumps `protobufVersion` from 4.32.0 to 4.32.1.

Updates `com.google.protobuf:protobuf-javalite` from 4.32.0 to 4.32.1

Updates `com.google.protobuf:protoc` from 4.32.0 to 4.32.1
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-javalite
  dependency-version: 4.32.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protoc
  dependency-version: 4.32.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-12 09:02:24 +00:00
dependabot[bot]
202dc99656 Bump com.google.code.gson:gson from 2.13.1 to 2.13.2
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.13.1 to 2.13.2.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.13.1...gson-parent-2.13.2)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 09:02:31 +00:00
Tobi
0023b22095 Merge pull request #1352 from Stypox/yt-confirm-not-bot
[YouTube] Add custom error for "Sign in to confirm ..."
2025-08-28 10:20:25 -07:00
Stypox
b8bd4cda8c [YouTube] Add custom error for "Sign in to confirm ..." 2025-08-28 16:56:39 +02:00
dependabot[bot]
a7f263f4dd Bump protobufVersion from 4.31.1 to 4.32.0
Bumps `protobufVersion` from 4.31.1 to 4.32.0.

Updates `com.google.protobuf:protobuf-javalite` from 4.31.1 to 4.32.0

Updates `com.google.protobuf:protoc` from 4.31.1 to 4.32.0
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-javalite
  dependency-version: 4.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.protobuf:protoc
  dependency-version: 4.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-25 19:28:45 +00:00
dependabot[bot]
826188db8c Bump org.jsoup:jsoup from 1.21.1 to 1.21.2
Bumps [org.jsoup:jsoup](https://github.com/jhy/jsoup) from 1.21.1 to 1.21.2.
- [Release notes](https://github.com/jhy/jsoup/releases)
- [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES.md)
- [Commits](https://github.com/jhy/jsoup/compare/jsoup-1.21.1...jsoup-1.21.2)

---
updated-dependencies:
- dependency-name: org.jsoup:jsoup
  dependency-version: 1.21.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-25 16:18:30 +00:00
AudricV
7673ea07b6 [YouTube] Add support for premieres in lockupViewModels 2025-08-09 23:57:34 +02:00
Tobi
8476a463e8 Fix JDoc and automated doc build
See https://github.com/TeamNewPipe/NewPipeExtractor/actions/runs/16660575612/job/47156509194#step:5:43

NewPipeExtractor/NewPipeExtractor/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemLockupExtractor.java:29: error: self-closing element not allowed
 * This extractor is currently (2025-07) only used to extract related video streams.<br/>
2025-08-01 07:59:08 +02:00
Stypox
0a7b72aec6 Merge pull request #1354 from AudricV/yt_more_kiosks_and_trending_deprecation 2025-07-31 23:24:13 +02:00
AudricV
2cccf48d6c Add an UnsupportedContentInCountryException and use it in YouTube Charts
This allows client to distinguish of a generic
ContentNotSupportedException, which hasn't fully its place for its usage
in YouTube Charts.
2025-07-31 21:10:38 +02:00
AudricV
25e30b745a [YouTube] Set running lives as new default kiosk
Also move YoutubeKioskExtractorTest.Trending at the bottom of the file
and add deprecation notice on test class too.
2025-07-31 21:10:38 +02:00
AudricV
5c7abeeab0 [YouTube] Add mocks for new kiosks' tests 2025-07-31 21:10:37 +02:00
AudricV
0687977690 [YouTube] Add tests for new kiosks 2025-07-31 21:00:41 +02:00
AudricV
9f7690823d [YouTube] Move Trending kiosk to kiosk package, add deprecation comment
Trending is still working at the time this commit is made, it has been
just removed from the interface.

Also remove getInstance method of YoutubeTrendingLinkHandlerFactory to
make the INSTANCE static field public, for consistency with other
kiosks of the service.
2025-07-31 21:00:41 +02:00
AudricV
21c3aad320 [YouTube] Add trending music extractor
This kiosk is meant to return official music videos, but it also
returns unofficial content and autogenerated tracks, hence the
kiosk name.

Making requests with an unsupported YouTube Charts country leads to a
400 HTTP error, so for these countries a ContentNotSupportedException
is thrown by the extractor.
2025-07-31 21:00:41 +02:00
AudricV
f4203e632d [YouTube] Add trending movies and shows trailers extractor
This kiosk also returns some videos for unsupported YouTube Charts
countries, even if there are fewer than in a supported country.
2025-07-31 21:00:41 +02:00
AudricV
e643024ff0 [YouTube] Add base class to parse trending videos' charts responses 2025-07-31 21:00:40 +02:00
AudricV
a4aeedff90 [YouTube] Add WEB_MUSIC_ANALYTICS constants, make some methods public
This is the client for YouTube Charts (charts.youtube.com).

Also change nullability of two fields and fix wrong client constant
usage in ofWebEmbeddedPlayerClient method in InnertubeClientRequestInfo.

Usages in YoutubeParsingHelper have been updated, getClientHeaders and
prepareJsonBuilder methods in this class have been made public.
2025-07-31 21:00:40 +02:00
TobiGr
6397b2ec3f Fix missing paranthesis in condition and improve null-safety 2025-07-31 11:19:33 +02:00
litetex
aa70b5a04b Create `YouTubeChannelHelperTest` 2025-07-31 11:19:17 +02:00
litetex
b05347d68d Redirection doesn't always seem to happen
Ref: https://github.com/TeamNewPipe/NewPipeExtractor/pull/1347#issuecomment-3123364807
Co-Authored-By: Audric V. <74829229+AudricV@users.noreply.github.com>
2025-07-31 11:10:33 +02:00
litetex
f91454d24f [YT] Correctly resolve redirects when resolving channel ids 2025-07-31 10:57:11 +02:00