Commit Graph

564 Commits

Author SHA1 Message Date
XiangRongLin 1c78976900 [YouTube] Expand regex to match n param decrypt function
Temporary solution
2021-07-29 20:26:36 +02:00
TobiGr 79f2d74b04 Fix test
The decryption code changes over time. Only check whether the n parameter was changed in the URL
2021-07-28 16:45:31 +02:00
TiA4f8R 32055147e0 Do some code improvements
Use final where possible, annotate some methods and parameters as Nonnull and format new code to be in the 100 characters limit per line.
2021-07-27 17:24:27 +02:00
XiangRongLin 3a3d1d7f2b Make YoutubeJavaScriptExtractor and JavaScript methods static
Also address review and rewrite some comments
2021-07-20 20:48:11 +02:00
XiangRongLin a02ee2e952 Rewrite youtube throttling solution and add tests 2021-07-17 19:10:09 +02:00
XiangRongLin b9549ace25 [Youtube] Fix lofi girl test and ignore mix with id test 2021-06-29 21:12:20 +02:00
XiangRongLin 5982431ffb Remove IPv4 addresses from response during mock recording 2021-06-29 21:03:33 +02:00
bopol e9a992b0a9 [youtube] Fix extraction of age restricted videos 2021-06-23 12:06:02 +02:00
Tobi d4186d100b
Merge pull request #580 from TeamNewPipe/accountTerminated
Add AccountTerminatedException for terminated channels
2021-06-08 09:55:58 +02:00
TobiGr fa444c8298 Remove assertations of exception messages 2021-06-06 11:38:43 +02:00
XiangRongLin faa503c7dd Fix PeertubeAccountExtractorTest 2021-06-03 19:54:42 +02:00
TiA4f8R ac31f3a883
Specify UTF-8 file encoding in RecordingDownloader and MockDownloader
On Windows, mocks are recorded and read with the Cp1252 encoding so it breaks the mocks on non ASCII characters for Linux OS (and so the CI).
The project is in Java 8, so we can't use FileReader(File, Charset) and FileReader(File, Charset) because these methods require Java 11. Instead of changing the Java version of the extractor, use OutputStreamWriter and FileOutputStream instead of FileWriter and InputStreamReader and FileInputStream instead of FileReader.
2021-06-03 18:38:25 +02:00
bopol ff11c2df2a
Merge pull request #628 from litetex/fix-broken-yt-liked-comments
Fix broken yt likes in comments
2021-05-29 11:04:11 +02:00
Tobi 519bba70b3
Merge pull request #630 from XiangRongLin/fix_tests
Fix MetaInfoTest.expectedMetaInfo
2021-05-28 14:16:53 +02:00
litetex e81b0e2885 Tweaked code 2021-05-27 19:48:31 +02:00
litetex 8c96545e57 Merge branch 'TeamNewPipe:dev' into fix-broken-yt-liked-comments 2021-05-24 18:06:45 +02:00
litetex 020acfed71 Fixed tests and added new ones 2021-05-24 18:05:26 +02:00
litetex 86bb9efb5d Added likeCount back to tests 2021-05-24 18:05:25 +02:00
XiangRongLin 18c8cac40c Fix MetaInfoTest.expectedMetaInfo
Expected meta changed
2021-05-21 21:00:08 +02:00
litetex 10cf081145
Removed likeCount and added textualVoteCount 2021-05-20 20:10:14 +02:00
TobiGr 1acc53b8db [PeerTube] Add support for HLS streams 2021-05-15 12:39:23 +02:00
Tobi 3a3ade20f4
Merge pull request #620 from TeamNewPipe/bandcamp-comments
Add Bandcamp comments (first page)
2021-05-02 13:43:53 +02:00
Fynn Godau 85a4270bd9 [Bandcamp] Fix comments test 2021-05-02 13:07:24 +02:00
TobiGr ec50570053 Add mocks 2021-05-01 17:50:19 +02:00
TobiGr f4404b5cc8 Add tests for more reasons 2021-05-01 17:50:19 +02:00
TobiGr fc998589dc Detect channels which have been terminated due to copyright infringement 2021-05-01 17:50:19 +02:00
TobiGr bb3861ddce Add AccountTerminatedException for better error handling of terminated channels 2021-05-01 17:50:19 +02:00
Tobi 284362fc15
Merge pull request #608 from TeamNewPipe/youtube-fix-segment-test
[YouTube] fix tests
2021-05-01 17:24:41 +02:00
TobiGr 9c12dc5609 [SoundCloud] Fix SoundCloud ID extraction
resolveIdWithEmbedPlayer() does not work anymore because the JSON data has been extracted to an API call. For this reason, replace resolveIdWithEmbedPlayer() with resolveIdWithWidgetApi)( which performs the API call.
2021-04-26 17:58:34 +02:00
Fynn Godau 9dc7a1d5ee [Bandcamp] Add comments (first page) 2021-04-26 17:25:04 +02:00
Fynn Godau 90b5c00599 Extract related items #593 2021-04-13 17:56:19 +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 318cec7625 [Bandcamp] Add Radio stream segments 2021-04-11 21:19:44 +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
TobiGr 883f16e0ad [YouTube] Set CONSENT cookie 2021-04-07 14:11:37 +02:00
XiangRongLin aee3838ed5 Ignore unreliable SoundcloudGoPlusTrack.testRelatedItems 2021-04-06 18:26:45 +02:00
XiangRongLin 7b36469807 Fix SoundcloudGoPlusTrack
https://soundcloud.com/martinsolveig/places#t=0 has related streams
2021-04-04 09:39:26 +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
Fynn Godau dbcf61c6f7 [Bandcamp] Load more featured pages 2021-03-28 12:53:05 +02:00
Stypox b4dee6d08f
Merge pull request #306 from B0pol/metadata
Extract metadata for youtube, soundcloud & mediaccc
2021-03-27 08:45:47 +01:00
TobiGr b029779217 [media.cc.de] Disable unreliable tests for now 2021-03-25 19:44:44 +01:00
TiA4f8R 772de53a66
Increase the number of subscribers in PeertubeAccountExtractorTest 2021-03-25 17:49:20 +01:00
TiA4f8R efe2b964f0
Extract real subscribers of a Peertube account
Apply fix provided in the PR and move all accounts/ strings to a constant, ACCOUNTS.
2021-03-25 17:47:44 +01:00
Tobi 12835bfae1
Merge pull request #551 from FireMasterK/ff-privacy
Change UA to privacy.resistFingerprinting.
2021-03-24 17:58:34 +01:00
XiangRongLin 9009f1e277
Merge pull request #517 from XiangRongLin/flaky_test
Add MockOnlyRule to allow skipping specific tests based on downloader
2021-03-20 18:04:14 +01: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
TiA4f8R 0e3e420a25
Fix tests 2021-03-14 17:54:21 +01:00
TiA4f8R 0438828e36
Add a test for the number of audioStreams in CreativeCommonsPlaysWellWithOthers test
It should be only two audio streams for track "Plays Well with Others, Ep 2: What Do an Army of Ants and an Online Encyclopedia Have in Common?" by Creative Commons (https://soundcloud.com/wearecc/plays-well-with-others-ep-2-what-do-an-army-of-ants-and-an-online-encyclopedia-have-in-common):
- one which is a progressive stream, in MP3 format with a bitrate of 128 kbps
- one which is an HLS stream, in OPUS format with a bitrate of 64 kbps.
2021-03-14 17:54:18 +01:00
Fynn Godau 2e57a8f24f [Bandcamp] Fix link handler acceptance behaviour
* Test for bandcamp footer instead of meta tag (which is not present on
  all pages)
* Accept links to /music, not just /releases
* Correctly handle uppercase URLs
2021-03-14 09:51:30 +01:00
TobiGr 70d9e389b9 [Bandcamp] Add tests for external bandcamp artists
Necessary, because the external pages tested before were converted to bandcamp.com pages. See f9d06252f2
2021-03-13 20:51:59 +01:00
TobiGr f9d06252f2 [Bandcamp] Fix tests 2021-03-13 17:42:39 +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
TobiGr 22fa131922 Merge branch 'dev' into bandcamp 2021-03-05 19:45:37 +01:00
TobiGr 22e6f33f0a
Ignore SoundCloudGeoRestrictedTest until HLS stream extraction is added
The ContentNotSupportedException is thrown because no supported audio streams where extracted. However, SoundCLoud does not check, whether there are any streams available. 
This commit should be reverted in #526
2021-03-05 16:38:47 +01:00
TobiGr 21158744b1
Add expectedDescriptionIsEmpty() to DefaultStreamExtractorTest
Also check if related streams are empty if they are expected to be empty.
2021-03-05 16:38:46 +01:00
TiA4f8R f15d7837a1
Fix SoundCloud tests 2021-03-05 16:38:45 +01:00
TiA4f8R 4e45aef2b3
Fix SoundCloud CreativeCommonsPlaysWellWithOthers test 2021-03-05 16:38:43 +01:00
TiA4f8R 3925204658
Add tests and rename SoundcloudGoPlusException to SoundcloudGoPlusContentException 2021-03-05 16:38:40 +01:00
XiangRongLin beb05bd05c Replace test url, because playlist was deleted 2021-03-03 19:46:14 +01:00
XiangRongLin e13e237392 Fix typo and reword some explanations 2021-02-26 17:48:03 +01:00
TobiGr 70814dcfef Fix Utils.nonEmptyAndNullJoin
When using the index here, it the index needs to be decremented once an element is removed. To cirecumvent this, the native Collections.removeIf() method is used.
2021-02-21 12:51:47 +01:00
FireMasterK e8bccfaf5d
Change UA to privacy.resistFingerprinting. 2021-02-20 17:14:41 +05:30
bopol 0c831afa7b use DownloaderFactory instead of DownloaderTestImpl for search ChannelVerified 2021-02-20 11:41:30 +01:00
XiangRongLin adf9d7d10f Add reason field to MockOnly
This enforces developers to document why a test is skipped
2021-02-19 18:54:18 +01:00
XiangRongLin ea52030613 Add MockOnlyRule to allow skipping specific tests based on downloader 2021-02-19 18:54:17 +01:00
TobiGr 02920fafa8 Add isUploaderVerified() 2021-02-19 15:51:23 +01:00
TobiGr 91e9309486 Merge remote-tracking branch 'origin/dev' into bandcamp 2021-02-19 13:37:45 +01:00
TobiGr fa61b864f2 Code improvements 2021-02-19 13:37:24 +01:00
bopol 1a322ad8ed Add uploader verified by service extraction 2021-02-18 16:36:40 +01:00
XiangRongLin a64579da2f Unignore some tests that work on Linux 2021-02-17 20:31:26 +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
TobiGr 54aa5b3042 Use propper structure in KioskExtractors
Made BandCampRadioExtractor a Kiosk which holds StreamInfoItems and not InfoItems.
2021-02-16 21:09:42 +01:00
bopol 84380e4c3a
Merge pull request #536 from B0pol/watchendpoints
support /watch/, /v/ and /w/ subpaths
2021-02-16 20:23:27 +01:00
XiangRongLin a9594f531f
Merge pull request #543 from XiangRongLin/unignore1
Unignore and fix some tests
2021-02-16 18:00:16 +01:00
XiangRongLin a28e0226c5
Merge pull request #519 from XiangRongLin/better_logging_error_handling
Better logging, error handling, doc for mock tests
2021-02-16 15:06:06 +01:00
XiangRongLin 05cb22c654 Unignore Gronkh.testDescription
Remove special character ü from assertion
2021-02-16 08:59:35 +01:00
XiangRongLin d9b4c2779f Unignore YoutubeSearchQHTest.testRegularValues 2021-02-16 08:59:35 +01:00
XiangRongLin 137272b7a4 Unignore YoutubeCommentsExtractorTest.EmptyComment
Mock files were missing
2021-02-16 08:59:34 +01:00
TobiGr 5bf9fddba9 Code improvements 2021-02-15 22:45:17 +01:00
TobiGr e062c8cb0d Merge branch 'dev' into bandcamp 2021-02-15 22:09:41 +01:00
bopol 557934cb17 use EMPTY_STRING 2021-02-15 18:51:46 +01:00
bopol 9ca52ca68a use only one constant UTF-8 2021-02-15 18:47:54 +01:00
XiangRongLin a88b2e6af4 Undo formatting of YoutubeStreamExtractorDefaultTest 2021-02-14 14:57:23 +01:00
bopol 81317cf6bc youtube: support /w/ folder 2021-02-13 22:20:05 +01:00
bopol f15c0fcfed support /watch/ and /v/ folders 2021-02-13 22:20:05 +01:00
XiangRongLin 971128c464 Ignore failing tests 2021-02-13 20:28:03 +01:00
XiangRongLin d6b9930c18 Use DownloaderFactory in YoutubeCommentsExtractorTest.Pinned 2021-02-13 20:12:39 +01:00
XiangRongLin b555f38fa5 Use real downloader for YoutubeSubscriptionExtractorTest
It doesn't make network requests anyway
2021-02-13 20:12:39 +01:00
XiangRongLin f352b0c7af YoutubeMusicSearchExtractorTest can't be used with mocks
Requires further research
2021-02-13 20:00:51 +01:00
XiangRongLin f45b5610bf Unignore YoutubeChannelLocalizationTest
With mocks time is not a concern anymore
2021-02-13 20:00:51 +01:00
XiangRongLin 19737e06ee Use DownloaderFactory in YoutubeChannelExtractorTest
KurzgesagtAdditional needed to be extracted because it ran a duplicated request.
2021-02-13 20:00:51 +01:00