NewPipeExtractor/extractor/src/main/java/org/schabi/newpipe/extractor
TiA4f8R 05b7fee23b
[YouTube] Add the cpn param to playback requests and try to spoof better the Android client
The cpn param, aka the content playback nonce param, is a parameter sent by YouTube web client in videoplayback requests, and for some of them, in the player request body. This PR adds it everywhere.

For the desktop/WEB client, some params were missing from the playbackContext object, which seemed (or not) to make YouTube throttle streams extracted from the WEB client. This PR adds them.

Fingerprinting on the WEB client basing on the client version used is not possible anymore, because the latest client version is extracted at the first time of a YouTube request on a session which require the extractor to fetch again the website (and this may come back the reCaptcha issues again unfortunately, but it seems there is no other way to get it).

For the Android client, the video id is now also sent as a query parameter, like a 12 characters string, in the t query parameter, in order to spoof better this client. Researches need to be done on this parameter, unique to each request, and how it is generated by clients.

This commit also fixes a small bug with the Android User-Agent string.

Some code improvements have been also made.
2022-03-27 20:51:38 +02:00
..
channel Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
comments Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
downloader Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
exceptions Add AccountTerminatedException for better error handling of terminated channels 2021-05-01 17:50:19 +02:00
feed Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
kiosk Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
linkhandler Fixed new checkstyle problems from dev 2022-03-26 19:46:10 +01:00
localization Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
playlist Fixed new checkstyle problems from dev 2022-03-26 19:46:10 +01:00
search Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
services [YouTube] Add the cpn param to playback requests and try to spoof better the Android client 2022-03-27 20:51:38 +02:00
stream Legitimately suppress remaining checkstyle warnings 2022-03-26 19:43:08 +01:00
subscription Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
suggestion Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
utils Fix useage of wrong object 2022-03-26 20:17:50 +01:00
Collector.java Created gradle module and moved existing code to new one 2018-03-14 00:44:02 -03:00
Extractor.java Restored original naming 2022-03-26 19:43:09 +01:00
Info.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00
InfoItem.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00
InfoItemExtractor.java Created gradle module and moved existing code to new one 2018-03-14 00:44:02 -03:00
InfoItemsCollector.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00
ListExtractor.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00
ListInfo.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00
MediaFormat.java Legitimately suppress remaining checkstyle warnings 2022-03-26 19:43:08 +01:00
MetaInfo.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00
MultiInfoItemsCollector.java Fix checkstyle issues in subpackages with abstract classes 2022-03-26 19:40:10 +01:00
NewPipe.java Minimized some code 2022-03-26 20:51:37 +01:00
Page.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00
ServiceList.java Legitimately suppress remaining checkstyle warnings 2022-03-26 19:43:08 +01:00
StreamingService.java Fix checkstyle issues in root package extractor/ 2022-03-26 19:40:14 +01:00