Commit Graph

84 Commits

Author SHA1 Message Date
TiA4f8R b30e341559
Add link to learn more about the issue which makes YoutubeStreamExtractorRelatedMixTest.testRelatedItems test disabled 2022-04-04 20:36:59 +02:00
TiA4f8R 70812fa611
Update YouTube stream mocks and disable YoutubeStreamExtractorRelatedMixTest
Mixes seems to be not given by YouTube anymore if you use a PENDING consent cookie value.
As mocks needs to updated, the test is always failing because of this change.
2022-04-02 19:28:49 +02:00
litetex 349ba8db7f
Improve tests and randomness
- Use the existing RNG inside YoutubeParsingHelper
- Deduplicated test-setup for YouTube tests
- Minor improvements
2022-03-27 20:52:38 +02:00
TiA4f8R 52376949e5
Add setSeedForVideoTests method in YoutubeStreamExtractor tests
In order to use still use mocks with the generation of random strings in player requests, we need to use YoutubeParsingHelper.setSeedForVideoTests() method in every stream test.
2022-03-27 20:51:39 +02:00
litetex fcee247f9f Switched to mockonly tests
* Made the reason why the tests are mockonly mandatory
2022-03-26 20:52:28 +01:00
litetex ba43dbaa28 Fix Tests: The channel lost abos 2022-03-26 20:49:38 +01:00
Stypox 09ddb6adbb
[YouTube] Add MockOnly to method testing mixes in related items 2022-03-19 10:54:38 +01:00
Stypox 8201b3b90e
[YouTube] Parse any playlist (including music mixes) in related items 2022-03-19 10:48:13 +01:00
Stypox 34a4484c72
[YouTube] Add test for a video with a mix in related items 2022-03-19 10:44:06 +01:00
Stypox 0c37c75981
Make getDownloader static & extract getDownloaderType 2022-03-16 17:22:42 +01:00
FireMasterK 6950b362f2
Add test values for failing tests. 2022-02-24 12:55:13 +00:00
FireMasterK 6f3f608ab6
Add support for extracting channel subscriber count in StreamInfo. 2022-02-24 12:50:51 +00:00
Stypox 59e0aeba88
Merge pull request #768 from litetex/junit-5
JUnit 5
2022-01-24 16:56:16 +01:00
Mohammed Anas 65df39b3e3
[YouTube] parse timestamps with >3 digits correctly (#775)
* [YouTube] parse timestamps with >3 digits correctly

Fixes https://github.com/TeamNewPipe/NewPipe/issues/7530; check the
issue for details.

* Remove outdated comment
2022-01-12 10:45:06 +01:00
litetex a2cbdf0991 Updated to JUnit 5 2021-12-27 21:08:08 +01:00
litetex 4d0a689cb6 Disabled dislike count in tests 2021-12-27 17:04:46 +01:00
litetex 7f99c1c193 Fixed YoutubeStreamExtractorLivestreamTest 2021-12-08 21:16:39 +01:00
litetex 3c669d3cb5 Fixed YoutubeStreamExtractorAgeRestrictedTest
Looks like a lot of stuff (description, tags, name) got changed on the existing video.
Use a better suited video.
2021-12-08 21:08:03 +01:00
TiA4f8R d55109258d
Fix YoutubeStreamExtractorAgeRestrictedTest 2021-08-01 12:39:03 +02:00
TiA4f8R 609919db59
Adress again reviews, fix some rebase issues 2021-08-01 12:39:00 +02:00
TiA4f8R 4299d806a2
Adress changes 2021-08-01 12:38:59 +02:00
TiA4f8R 81013e5a8e
Add a static method to reset the YouTube deobfuscation code and use it 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.
2021-08-01 12:38:58 +02:00
TiA4f8R 7474049fd1
Update mocks 2021-08-01 12:38:39 +02:00
TiA4f8R 3017dde67e
Fix some typos 2021-08-01 12:38:36 +02:00
TiA4f8R effcdaa4f2
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.
2021-08-01 12:38:04 +02:00
TiA4f8R e075dd5a63
Update client version, fix some tests, update mocks and do some improvements
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
2021-08-01 12:38:02 +02:00
TiA4f8R 9ab9c66ddf
Use the youtubei.googleapis.com domain for YouTube Music searches + change 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
2021-08-01 12:37:56 +02:00
XiangRongLin b9549ace25 [Youtube] Fix lofi girl test and ignore mix with id test 2021-06-29 21:12:20 +02:00
bopol e9a992b0a9 [youtube] Fix extraction of age restricted videos 2021-06-23 12:06:02 +02:00
TobiGr 50005ce937 [YouTube] Replace unavailable YouTube Stream Segments test
The stream is unavailable in many countries.
2021-04-11 22:58:48 +02:00
TobiGr 55e0f8e725 Merge branch 'master' into dev 2021-04-10 11:33:34 +02:00
TobiGr 4b8d4a84b6 Set the NumberGenerator for th remaining tests 2021-04-09 11:59:17 +02:00
XiangRongLin 4833df60e5 Add method to inject Random into YoutubeParsingHelper and use in tests 2021-04-08 16:36:55 +02:00
TobiGr 4ee270fe01 Fix LiveStream Test 2021-04-07 14:11:41 +02:00
XiangRongLin 3d70b6d46a Fix a test and ignore rest 2021-04-03 11:03:10 +02:00
Fynn Godau 14f6f1b7c3 Generify related streams calls and rename method 2021-03-31 20:24:40 +02:00
bopol 152221c7fb
ignore a test with encoding problems 2021-03-19 10:14:43 +01:00
bopol 8806fb4e6b
address reviews 2021-03-19 10:14:43 +01:00
bopol c47cc54908
Extract metadata for YouTube, SoundCloud & MediaCCC 2021-03-19 10:14:43 +01:00
Tobi 7e6f464407
Merge pull request #509 from TiA4f8R/soundcloud-improvements
Add new exceptions to be able to display different error messages in apps
2021-03-07 13:51:15 +01:00
Tobi ac51134aed
Merge pull request #546 from XiangRongLin/unignore2
Unignore more tests
2021-03-07 13:15:24 +01:00
TiA4f8R 3925204658
Add tests and rename SoundcloudGoPlusException to SoundcloudGoPlusContentException 2021-03-05 16:38:40 +01:00
bopol 1a322ad8ed Add uploader verified by service extraction 2021-02-18 16:36:40 +01:00
XiangRongLin b99cb8624f Unignore PublicBroadcasterTest
Tests only work on linux, mocks have to be generated on linux too
2021-02-17 20:31:26 +01:00
XiangRongLin 37366c65ca Remove encoding of '&' to '&' in test and unignore it 2021-02-17 20:31:26 +01:00
XiangRongLin c327922cc0 Add explanations to broken tests 2021-02-17 20:31:26 +01:00
bopol 557934cb17 use EMPTY_STRING 2021-02-15 18:51:46 +01:00
XiangRongLin a88b2e6af4 Undo formatting of YoutubeStreamExtractorDefaultTest 2021-02-14 14:57:23 +01:00
XiangRongLin 971128c464 Ignore failing tests 2021-02-13 20:28:03 +01:00
XiangRongLin 84eb4b30c9 Use DownloaderFactory in YouTube tests 2021-02-13 20:00:51 +01:00