-
Notifications
You must be signed in to change notification settings - Fork 417
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] Use the new internal API in NewPipe Extractor #604
Commits on Aug 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 5794eb2 - Browse repository at this point
Copy the full SHA 5794eb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a12c69d - Browse repository at this point
Copy the full SHA a12c69dView commit details -
Use the youtubei API for YouTube searches + update mocks
Add getSearchParameter, a new method in YoutubeSearchQueryHandlerFactory class which returns the params field for a search, or an empty string if there is no one. Update mocks of YoutubeSearchExtractorTest.
Configuration menu - View commit details
-
Copy full SHA for f461224 - Browse repository at this point
Copy the full SHA f461224View commit details -
Configuration menu - View commit details
-
Copy full SHA for 77c031a - Browse repository at this point
Copy the full SHA 77c031aView commit details -
Use the youtubei.googleapis.com domain for YouTube Music searches + c…
…hange a check + update client version and mocks Change the domain from music.youtube.com to youtubei.googleapis.com. Use a lightweight request to check if the hardcoded YouTubeMusic keys are valid. Increase the length of the response to 500 because if the key is invalid, the length of the response returned is higher than 250 and the response when the key is valid is higher than 1500. Format the YoutubeMusicSearchExtractor file. Update YouTube web client version and mocks
Configuration menu - View commit details
-
Copy full SHA for 9ab9c66 - Browse repository at this point
Copy the full SHA 9ab9c66View commit details -
Use lightweight requests when getting and checking YouTube API key an…
…d client version
Configuration menu - View commit details
-
Copy full SHA for 991b2c7 - Browse repository at this point
Copy the full SHA 991b2c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58ce9b0 - Browse repository at this point
Copy the full SHA 58ce9b0View commit details -
Do some improvements to YoutubeStreamExtractor
Get the real name of the uploader (for autogenerated channels and music artist channels), like before the migration to the JSON pbj. Do some other improvements, especially reformatting some code to be in the 100 characters line limit and use final where possible.
Configuration menu - View commit details
-
Copy full SHA for b49ae54 - Browse repository at this point
Copy the full SHA b49ae54View commit details -
Update client version, fix some tests, update mocks and do some impro…
…vements Add the origin and the referer headers with the https://www.youtube.com value for YouTube JSON POST requests. Don't add the consent cookie header for the requests which use the youtubei/innertube API because it's uneeded. Fix some tests and update YouTube mocks
Configuration menu - View commit details
-
Copy full SHA for e075dd5 - Browse repository at this point
Copy the full SHA e075dd5View commit details -
Adress reviews and do some improvements
Adress changes requested in reviews. Do some improvements, remove unused imports and format some code to be in the 100 characters line limit.
Configuration menu - View commit details
-
Copy full SHA for f46cfb0 - Browse repository at this point
Copy the full SHA f46cfb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d68283 - Browse repository at this point
Copy the full SHA 4d68283View commit details -
Update mocks, reenable a test and fix a test
This commit updates mocks and reenables the test invalidId of the NotAvailable class of the YoutubePlaylistExtractorTest class beacuse with the youtubei/innertube API, it returns "Not found" and doesn't redirect to the YouTube homepage. The expectedMetaInfo test of the MetaInfoTest class of the YoutubeSearchExtractorTest class was broken because YouTube removes the vaccine progress link of the WHO from the meta info so this commit removes it and the test is now passing.
Configuration menu - View commit details
-
Copy full SHA for effcdaa - Browse repository at this point
Copy the full SHA effcdaaView commit details -
Don't use the youtubei.googleapis.com but the websites domains + upda…
…te client version of the desktop internal API Use again www.youtube.com and music.youtube.com domains instead of youtubei.googleapis.com domain because it spoofs more a web client of YouTube or YouTube Music and may reduce Google's detection of NewPipe Extractor users.
Configuration menu - View commit details
-
Copy full SHA for f73c923 - Browse repository at this point
Copy the full SHA f73c923View commit details -
Use the youtubei API for YouTube videos + update client version
Update the hardcoded client version to 2.20210520.09.00 Use the player and next endpoints of the Innertube API for YouTube videos
Configuration menu - View commit details
-
Copy full SHA for e7d589e - Browse repository at this point
Copy the full SHA e7d589eView commit details -
Use the Android mobile API when there are OTF streams or the content …
…is protected by signatureCiphers Use the Android mobile API to get the itag 22 (720p with audio), removed when the content is protected by signatureCiphers. Also use this API when they are OTF streams, to get the itag 17 and 36, low 3GPP quality streams but also the itag 139. Update the web client version.
Configuration menu - View commit details
-
Copy full SHA for 013b902 - Browse repository at this point
Copy the full SHA 013b902View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3017dde - Browse repository at this point
Copy the full SHA 3017ddeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 14569c4 - Browse repository at this point
Copy the full SHA 14569c4View commit details -
Use the youtubei API for YouTube mixes + update the corresponding tes…
…t + do some improvements Use the youtubei API for YouTube mixes. The corresponding has been updated because the new API breaks the tests of YoutubeMixPlaylistExtractorTest. Remove some deprecated code (the old search code with the pbj JSON) and do some other improvements.
Configuration menu - View commit details
-
Copy full SHA for 0f9e9b8 - Browse repository at this point
Copy the full SHA 0f9e9b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae5abc0 - Browse repository at this point
Copy the full SHA ae5abc0View commit details -
Fix the fetch of the playerCode at each time getStsFromPlayerJs is ca…
…lled storePlayerJs was called even if sts was not empty in the getStsFromPlayerJs method. This commit fixes it.
Configuration menu - View commit details
-
Copy full SHA for b52732a - Browse repository at this point
Copy the full SHA b52732aView commit details -
Try to don't fetch again the first page when requesting a channel con…
…tinuation Try to don't fetch again the first page of a YouTube channel when requesting a continuation of it by trying to store the channel name and the channel id into the next page using the ids field of the Page class.
Configuration menu - View commit details
-
Copy full SHA for c32bc6e - Browse repository at this point
Copy the full SHA c32bc6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7474049 - Browse repository at this point
Copy the full SHA 7474049View commit details -
Fetch again the desktop player JSON only if the content is protected …
…by signatureCiphers
Configuration menu - View commit details
-
Copy full SHA for 947baec - Browse repository at this point
Copy the full SHA 947baecView commit details -
Readd the deleted code of views because watching count of livestreams…
… was broken The number shown was the total number of views that a livestream has. In order to fix this bug, the previous code is readded.
Configuration menu - View commit details
-
Copy full SHA for 318bc46 - Browse repository at this point
Copy the full SHA 318bc46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70927dd - Browse repository at this point
Copy the full SHA 70927ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6921e80 - Browse repository at this point
Copy the full SHA 6921e80View commit details -
Catch every exception instead of only IOException and ExtractionExcep…
…tion and add a Javadoc Catch every exception instead of only IOException and ExtractionException. Add JavaDoc for fetchAndroidMobileJsonPlayer method of YoutubeStreamExtractor
Configuration menu - View commit details
-
Copy full SHA for a59c2a3 - Browse repository at this point
Copy the full SHA a59c2a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54d4551 - Browse repository at this point
Copy the full SHA 54d4551View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34a9ccb - Browse repository at this point
Copy the full SHA 34a9ccbView commit details -
Format the YoutubeMusicSearchExtractor class to be in the 100 charact…
…ers per line limit
Configuration menu - View commit details
-
Copy full SHA for e97a685 - Browse repository at this point
Copy the full SHA e97a685View commit details -
Real fix of the fetch of the JS player at each the signatureTimestamp…
… is required The strings playerJsUrl, sts and playerCode are now static in order to don't fetch again the JavaScript player at each time the signatureTimestamp is needed.
Configuration menu - View commit details
-
Copy full SHA for 8c1c728 - Browse repository at this point
Copy the full SHA 8c1c728View commit details -
Configuration menu - View commit details
-
Copy full SHA for 657f165 - Browse repository at this point
Copy the full SHA 657f165View commit details -
Configuration menu - View commit details
-
Copy full SHA for 632772d - Browse repository at this point
Copy the full SHA 632772dView commit details -
Configuration menu - View commit details
-
Copy full SHA for accd5dd - Browse repository at this point
Copy the full SHA accd5ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc79852 - Browse repository at this point
Copy the full SHA cc79852View commit details -
Add a static method to reset the YouTube deobfuscation code and use i…
…t in tests This method is needed for YouTube stream tests, because when all YouTube tests are ran, the signatureTimestamp is known (the sts string) so a different body than the body present in the mocks is send by the extractor instance. As a result, running all YouTube stream tests with the MockDownloader (like the CI does) will fail if this method is not called before fetching the page of a test.
Configuration menu - View commit details
-
Copy full SHA for 81013e5 - Browse repository at this point
Copy the full SHA 81013e5View commit details -
Revert the use of Collections.singletonList instead of Arrays.asList …
…in addCookieHeader of YoutubeParsingHelper
Configuration menu - View commit details
-
Copy full SHA for a6a2c6e - Browse repository at this point
Copy the full SHA a6a2c6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d8177b5 - Browse repository at this point
Copy the full SHA d8177b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a6b8da - Browse repository at this point
Copy the full SHA 1a6b8daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4299d80 - Browse repository at this point
Copy the full SHA 4299d80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 609919d - Browse repository at this point
Copy the full SHA 609919dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27bd797 - Browse repository at this point
Copy the full SHA 27bd797View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8aa60d7 - Browse repository at this point
Copy the full SHA 8aa60d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3adac6a - Browse repository at this point
Copy the full SHA 3adac6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 629dcd6 - Browse repository at this point
Copy the full SHA 629dcd6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2320aec - Browse repository at this point
Copy the full SHA 2320aecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7753556 - Browse repository at this point
Copy the full SHA 7753556View commit details -
Rebase + some code improvements + fix extraction of age-restricted vi…
…deos + update clients version Here is now the requests which will be made by the `onFetchPage` method of `YoutubeStreamExtractor`: - the desktop API is fetched. If there is no streaming data, the desktop player API with the embed client screen will be fetched (and also the player code), then the Android mobile API. - if there is no streaming data, a `ContentNotAvailableException` will be thrown by using the message provided in playability status If the video is age restricted, a request to the next endpoint of the desktop player with the embed client screen will be sent. Otherwise, the next endpoint will be fetched normally, if the content is available. If the video is not age-restricted, a request to the player endpoint of the Android mobile API will be made. We can get more streams by using the Android mobile API but some streams may be not available on this API, so the streaming data of the Android mobile API will be first used to get itags and then the streaming data of the desktop internal API will be used. If the parsing of the Android mobile API went wrong, only the streams of the desktop API will be used. Other code changes: - `prepareJsonBuilder` in `YoutubeParsingHelper` was renamed to `prepareDesktopJsonBuilder` - `prepareMobileJsonBuilder` in `YoutubeParsingHelper` was renamed to `prepareAndroidMobileJsonBuilder` - two new methods in `YoutubeParsingHelper` were added: `prepareDesktopEmbedVideoJsonBuilder` and `prepareAndroidMobileEmbedVideoJsonBuilder` - `createPlayerBodyWithSts` is now public and was moved to `YoutubeParsingHelper` - a new method in `YoutubeJavaScriptExtractor` was added: `resetJavaScriptCode`, which was needed for the method `resetDebofuscationCode` of `YoutubeStreamExtractor` - `areHardcodedClientVersionAndKeyValid` in `YoutubeParsingHelper` returns now a `boolean` instead of an `Optional<Boolean>` - the `fetchVideoInfoPage` method of `YoutubeStreamExtractor` was removed because YouTube returns now 404 for every client with the `get_video_info` page - some unused objects and some warnings in `YoutubeStreamExtractor` were removed and fixed Co-authored-by: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2eeb0a3 - Browse repository at this point
Copy the full SHA 2eeb0a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d551092 - Browse repository at this point
Copy the full SHA d551092View commit details -
Configuration menu - View commit details
-
Copy full SHA for 693f654 - Browse repository at this point
Copy the full SHA 693f654View commit details -
Configuration menu - View commit details
-
Copy full SHA for 286d839 - Browse repository at this point
Copy the full SHA 286d839View commit details -
Use the youtubei API for YouTube comments
Migrate YouTube comments to the desktop version by using the `next` endpoint of the InnerTube internal API. With the desktop version, we are able to get the exact like count of YouTube comments (by parsing the accessibility data) (the current extraction is used as a fallback). We are also now able to get if the uploader of the comment is verified or not. Co-authored-by: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for f3e4c9d - Browse repository at this point
Copy the full SHA f3e4c9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8197da - Browse repository at this point
Copy the full SHA f8197daView commit details -
Reformat some code and don't use the clickTrackingParams in continuat…
…ions of YouTube Music search results The clickTrackingParams of YouTube Music search results are not needed to get continuations. This commit removes their use, which may improve privacy.
Configuration menu - View commit details
-
Copy full SHA for b74a39c - Browse repository at this point
Copy the full SHA b74a39cView commit details -
Fix tests of YoutubePlaylistExtractorTest and YoutubeMixPlaylistExtra…
…ctorTest Without removing RunWith and SuiteClasses annotations (and the corresponding imports) in YoutubePlaylistExtractorTest and YoutubeMixPlaylistExtractorTest, some mocks cannot be generated, so the CI fails because of the missing mocks. Mocks of workings tests have been also updated.
Configuration menu - View commit details
-
Copy full SHA for 79cc5c8 - Browse repository at this point
Copy the full SHA 79cc5c8View commit details