Commit Graph

38 Commits

Author SHA1 Message Date
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
Stypox d660c04838
[YouTube] Also test playlist type in playlist tests 2022-03-19 10:48:13 +01:00
Stypox d8f2031619
Merge pull request #816 from Stypox/mock-only-extension
Add `@MockOnly` Junit 5 extension
2022-03-19 10:40:38 +01:00
TiA4f8R 35e082248e
Fix YouTube and SoundCloud playlists tests 2022-03-16 19:40:30 +01:00
Stypox 0c37c75981
Make getDownloader static & extract getDownloaderType 2022-03-16 17:22:42 +01:00
litetex 3712a669b1 Code cleanup / improvements
* Deprecated Utils#UTF-8; see StandardCharsets
* Added more helpful methods to ``ExtractorAsserts``
* Use parameterized (cool new) tests
* Restore functionality of some tests + updated mockdata
* Other code cleanups + Sonarlint improvements
2022-01-04 17:28:31 +01:00
litetex a2cbdf0991 Updated to JUnit 5 2021-12-27 21:08:08 +01:00
TiA4f8R 79cc5c8d12
Fix tests of YoutubePlaylistExtractorTest and YoutubeMixPlaylistExtractorTest
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.
2021-08-01 17:28:01 +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 f461224b2b
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.
2021-08-01 12:36:28 +02:00
XiangRongLin 4833df60e5 Add method to inject Random into YoutubeParsingHelper and use in tests 2021-04-08 16:36:55 +02:00
Tobi ac51134aed
Merge pull request #546 from XiangRongLin/unignore2
Unignore more tests
2021-03-07 13:15:24 +01:00
XiangRongLin beb05bd05c Replace test url, because playlist was deleted 2021-03-03 19:46:14 +01:00
bopol 1a322ad8ed Add uploader verified by service extraction 2021-02-18 16:36:40 +01:00
XiangRongLin c327922cc0 Add explanations to broken tests 2021-02-17 20:31:26 +01:00
XiangRongLin 84eb4b30c9 Use DownloaderFactory in YouTube tests 2021-02-13 20:00:51 +01:00
XiangRongLin 6888e7773f Ignore all failing tests 2021-01-15 20:11:40 +01:00
XiangRongLin 4dad3d60d6 Move DownloaderTestImpl into downloader package 2021-01-10 19:36:21 +01:00
XiangRongLin 5bceff0083 [YouTube] Fix extraction of next page url for the last page of playlist 2020-11-18 19:03:12 +01:00
XiangRongLin 8347e14952 [YouTube] Fix playlist continuations extraction 2020-11-17 21:04:53 +01:00
wb9688 4cc312086a Introduce Page class 2020-07-06 20:19:31 +02:00
wb9688 4d683e7655 Support YouTube's learning playlists 2020-05-29 09:17:03 +02:00
Mauricio Colli e590417cc4 Test if services recognizes their own items urls 2020-03-01 12:57:18 +01:00
Mauricio Colli e65333c3ce [YouTube] Detect deleted/nonexistent/invalid channels and playlists
- Added tests for these cases.
2020-03-01 12:49:13 +01:00
Mauricio Colli 408f042127 [YouTube] Fix bug when url isn't present in the browseEndpoint object 2020-03-01 12:49:13 +01:00
wb9688 365b0329f3 Implement getTextFromObject() function 2020-02-27 17:39:23 +01:00
Mauricio Colli 3638f0e0ea
Implement time ago parser and improve localization handling
- Handle special cases for languages where the number is not shown
- Rework the Downloader base implementation, allowing for more
advanced things to be done
- Separate the localization from the content country (just like
YouTube let's the user choose both).
2019-11-03 15:46:21 -03:00
Stypox 216a4eb1f5
Complete fix inconsistency in youtube channel urls
It is not always possible to get the url in the form "https://www.youtube.com/channel/...", so a not has been added whenever that happens to be the case (i.e. only in InfoStreamItems).
2019-08-16 21:17:03 +02:00
Christian Schabesberger 32d316330c fix broken search results 2018-10-25 15:46:47 +02:00
Christian Schabesberger ce2bbee1e9 add propper localization 2018-09-15 22:29:28 +02:00
Christian Schabesberger 4469d11307 fix channel links in description 2018-09-07 21:40:36 +02:00
Christian Schabesberger f498dd7875 fix failing unit tests
fix yt share url error
2018-08-28 17:19:22 +02:00
Christian Schabesberger 35b46900c1 add outcomming items of searchextractor to searchinfo 2018-07-08 19:53:25 +02:00
Christian Schabesberger 31b0480e22 fix failing tests 2018-07-08 14:43:49 +02:00
Christian Schabesberger b4544a67e8 add SearchExtractor 2018-07-01 16:55:48 +02:00
Christian Schabesberger 94d1eb6f32 restructure youtube service 2018-05-08 21:19:03 +02:00
Christian Schabesberger 08f0247d73 make UrlIdHandler actual wrapper for the url/id
fix tests

fix tests
2018-05-06 19:51:24 +02:00
Mauricio Colli f787b375e5
Created gradle module and moved existing code to new one 2018-03-14 00:44:02 -03:00