Commit Graph

79 Commits

Author SHA1 Message Date
Stypox 349990fd48
Fix redundant escape \\ in regex in Utils 2022-03-26 22:01:30 +01:00
litetex 9c07e8a664 Fix useage of wrong object 2022-03-26 20:17:50 +01:00
litetex ec5b54c38b Removed unused class 2022-03-26 19:43:10 +01:00
Stypox ca7c63f273 Fix remaining checkstyle issues in utils/ subpackage 2022-03-26 19:40:13 +01:00
Stypox 1d5f22e41f Fix checkstyle issues & more in JsonUtils
Also use Java 8 streams and extract duplicate code to getInstanceOf function
2022-03-26 19:40:13 +01:00
Stypox 87d2834986 Fix checkstyle issues & more in DonationLinkHelper
Also add comment about the class being unused and replace the fixLink function with Utils.stringToUrl()
2022-03-26 19:40:12 +01:00
Stypox bd7b362040 Fix checkstyle issues & more in DashMpdParser
Also remove useless null check on ItagItem.getItag() as that function already throws an exception if there is no itag
2022-03-26 19:40:11 +01:00
TiA4f8R b74a39c176
Reformat some code and don't use the clickTrackingParams in continuations 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.
2021-08-01 17:25:59 +02:00
XiangRongLin 37df225556 Remove length check from StringUtils.matchToClosingParenthesis 2021-07-31 16:05:24 +02:00
XiangRongLin 852a65ff18 Add tests for StringUtils 2021-07-30 19:56:57 +02:00
XiangRongLin 48d897e6ad Add final and adjust utils class name 2021-07-29 21:33:45 +02:00
XiangRongLin 60794aea31 [YouTube] Add parenthesis matching as way to parse decrypt function
From @Stypox
2021-07-29 21:23:00 +02:00
XiangRongLin 2967d1ae6a [YouTube] Compile YoutubeThrottlingDecrypter pattern statically 2021-07-29 20:27:29 +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 80cf8b3acd Extract separate YoutubeThrottlingDecoder 2021-07-15 20:05:25 +02:00
TiA4f8R c5c190500c
Format the SoundCloud package of the extractor and fix some warnings
Use final where possible in the package and format code to be in the 100 caracters per line limit.
Fix some warnings generated by Android Studio and do some code improvements
2021-05-23 18:08:42 +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 c877712647 Add deprecated old method calls to avoid breaking API 2021-04-01 22:32:36 +02:00
Fynn Godau 14f6f1b7c3 Generify related streams calls and rename method 2021-03-31 20:24:40 +02:00
bopol c47cc54908
Extract metadata for YouTube, SoundCloud & MediaCCC 2021-03-19 10:14:43 +01:00
TobiGr 22fa131922 Merge branch 'dev' into bandcamp 2021-03-05 19:45:37 +01:00
XiangRongLin 03b00ff1d6 Move toJsonArray and toJsonObject to JsonUtils 2021-03-04 18:58:51 +01:00
TobiGr a1688fe953 Move BandcampExtractorHelper.getJsonData(String, String) to JsonUtils 2021-02-21 13:51:12 +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
TobiGr b9e8ee8450 Rename BandcampExtractorHelper.smartConcatenate(String[], String) to Utils.nonEmptyAndNullJoin(String, String[]) 2021-02-21 12:35:14 +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
Stypox a64dfd7343
[YouTube Music] Fix extracting search item view/subscriber count when = 0 2021-01-29 16:44:24 +01:00
TobiGr 942d840624 Fix typo in AffiliateService: rename "NO_AFILIATE" to "NO_AFFILIATE" 2020-12-23 12:50:45 +01:00
Xiang Rong Lin 22d2f7e400 [Youtube] Add cookies to youtube mix request
This way youtube wont return duplicates when getting more items of the mix (but youtube can also track us)
2020-12-12 20:32:40 +01:00
Bri@n 82746d172f Fix typo in DonationLinkHelper and rewrote swtich statement 2020-11-01 17:34:34 -05:00
Stypox 9e53cf0b56
Fix parameter reassignment and other style issues
Also remove left-behind debug statement
2020-10-31 20:58:28 +01:00
Stypox 3fe55b30ba
Add support for Google search redirect url 2020-10-31 20:58:28 +01:00
Stypox c190a3029b
Consider protocol as base url when it is a custom one (e.g. vnd.youtube) 2020-10-31 20:58:28 +01:00
wb9688 4cc312086a Introduce Page class 2020-07-06 20:19:31 +02:00
wb9688 036cc7e26e Upgrade jsoup 2020-05-28 11:34:41 +02:00
bopol adaf196c99 remove unused import 2020-05-11 12:54:33 +02:00
bopol de26e00079 changed all == null || isEmpty() to isNullOrEmpty() 2020-05-11 11:40:24 +02:00
bopol 202a73516c refactor: add Utils.isNullOrEmpty() 2020-05-11 11:26:18 +02:00
Mauricio Colli 00d1ed439b
[YouTube] Fix channel extraction when redirects are in the response
Some redirects were embed directly into the response as instructions
for the page, instead of the usual http redirects.
2020-03-14 02:39:48 -03:00
Mauricio Colli 5686a6f562 [YouTube] Detect when a stream is deleted or doesn't exist
Added a test case as well.
2020-03-01 12:49:13 +01:00
TobiGr be3e20e263 Adapt most channel changes 2020-02-25 21:51:30 +01:00
TobiGr 030465b5d4 Improve code formatting and optimise imports 2020-02-15 13:36:54 +01:00
B0pol 341372c0d0 reindenting (ctrl alt l) on JsonUtils and PeertubeStreamExtractor 2020-01-24 20:16:24 +01:00
B0pol b816e48216
Merge branch 'dev' into peertube 2020-01-24 20:10:47 +01:00
TobiGr 9b45c61103 Typos, comments and formatting 2020-01-24 02:10:18 +01:00
B0pol 1a15c0e750 agelimit now returns 18 if the video is marked as nsfw, 0 otherwise
+ created getBoolean method in JsonUtils.java
2020-01-23 04:42:54 +01:00
bopol a281519e77 added metadata, fix descriptions, fix thumbnail, update tests
thumbnail: quality before: https://peertube.cpy.re/static/thumbnails/d2a5ec78-5f85-4090-8ec5-dc1102e022ea.jpg
quality after: https://peertube.cpy.re/static/previews/d2a5ec78-5f85-4090-8ec5-dc1102e022ea.jpg

description: we were getting about the first 260 characters, we now get full description (with fallback to first 260 chars if the get request for full description fails)
test: updated tests to match description, also changed some test: it was assertEquals(extracted, expected), but the proper way to do it is assertEquals(expected, extracted)

metadata: got host, privacy (public, private, unlisted), licence, language, tags
2020-01-20 12:22:33 +01:00
yausername 8a7aa6b9a9 added baseUrl param in linkhandlers. Required for multi instance services 2019-11-21 05:00:09 +05:30