Commit graph

48 commits

Author SHA1 Message Date
Stypox
ce7cbbc9a0
[YouTube] Fix trending getName() 2021-03-24 09:14:09 +01:00
ed850d0688 [youtube] improve comments extraction performance
- do not parse responseBody twice for continuation
instead try to get commentsTokenInside with the new pattern ("sectionListRenderer")
and try again with the old pattern ("commentSectionRenderer") on failure
- do not unescape responseBody multiple times
   -> parse responseBody less times
2021-03-05 13:37:08 +01:00
XiangRongLin
03b00ff1d6 Move toJsonArray and toJsonObject to JsonUtils 2021-03-04 18:58:51 +01:00
XiangRongLin
43b46bd408 Use new youtube continuations api for playlists
Requires sending a POST request instead of GET.
clientName and clientVersion, which were required as headers previously now need to be part of the request payload.
continuation id also needs to be part of request body.

quick and dirty solution.
2021-03-03 19:49:26 +01:00
1a322ad8ed Add uploader verified by service extraction 2021-02-18 16:36:40 +01:00
XiangRongLin
26d50aca05 Add comment explaining YoutubeParsingHelper.resetClientVersionAndKey 2021-02-17 19:21:39 +01:00
557934cb17 use EMPTY_STRING 2021-02-15 18:51:46 +01:00
9ca52ca68a use only one constant UTF-8 2021-02-15 18:47:54 +01:00
XiangRongLin
b43f3474f5 Make resetClientVersionAndKey public 2021-02-13 20:00:49 +01:00
2859c7ba5c add comment explaining why .substring(23) 2021-02-13 12:10:41 +01:00
a931e31239 fix tests 2021-02-12 22:36:18 +01:00
TobiGr
d728c4fad0 Remove unused imports
I searched for "StandardCharsets" to prevent possible bugs with Android KitKat. The import is unused and is therefor removed.
There are other usages of the StandardCharsets class in the test implementation, but those are not relevant.
2021-01-29 23:16:40 +01:00
53d3f7989b update invidious instances list 2021-01-22 19:30:25 +01:00
XiangRongLin
6ca7123d5d Add comment for usage of YoutubeParsingHelper.resetClientVersionAndKey 2021-01-14 20:01:52 +01:00
XiangRongLin
35e299759e Add method to allow resetting youtube client version and key
This is needed so that a request is made for each test class when running multiple at once. This way RecordingDownloader records all necessary requests.
This works as long as tests are run sequentially and not in parallel.
2021-01-10 20:24:50 +01:00
TobiGr
d9e2da53c3 Replace explicit string checks whether a playlist íd is a certain YouTube Mix type with calling the dedicated methods 2020-12-25 15:00:34 +01:00
TobiGr
3033c0b993 [YouTube] Music Mix: Fix playlist not being accepted
Regression introduced by YouTube Mix support (#280)
2020-12-23 21:08:36 +01:00
TobiGr
41a8ed625d Make some vars final and add annotations to methods 2020-12-22 18:19:26 +01:00
TobiGr
bc6de14952 Extract stream and search meta info for YouTube
Add method to extract Google webcache URLs.
2020-12-22 18:19:26 +01:00
XiangRongLin
cdcb66b93e Clean up stuff from mix pl
Coming from unclean merge and missing hints from IDE
2020-12-16 08:35:28 +01:00
XiangRongLin
ba8782a9ed Use lowercase string for extracting cookies
The map in a real response happens to ignore upper-/lowercase differences. Other maps used in unit test may not have that behaviour.
2020-12-16 08:32:04 +01:00
XiangRongLin
f90f6fcf92 [YouTube] Don't escape & in getUrlFromNavigationEndpoint for playlists 2020-12-12 20:40:13 +01:00
Xiang Rong Lin
a338e4e08e [Youtube] Apply review suggestions and avoid channel mix edge case 2020-12-12 20:32:43 +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
Xiang Rong Lin
3ff8619bcc [Youtube] apply wb9688 suggestion (mix)
Channel mix adjusments and test
Don't accept youtube music mix urls as playlist
Don't override playlistData to keep getInitialPage()
Remove json constants
Indentation
2020-12-12 20:30:57 +01:00
Xiang Rong Lin
327a5730a8 [Youtube] Add some comments to mix 2020-12-12 20:30:57 +01:00
Xiang Rong Lin
0efb854d27 [Youtube] Implement mix extractor for auto-generated playlists.
-New YoutubeMixPlaylistExtractor, that extracts from a mix (auto-generated playlist).
-The url has the format of "youtube.com/watch?v=videoID&playlistID",
where playlistID always starts with "RD" and usually followed by the videoID.
-Change YoutubePlaylistLinkHandlerFactory to create a linkhandler with the given url if it is a mix.
-Change YoutubeService to return YoutubeMixPlaylistExtractor if the url is a mix.
2020-12-12 20:30:57 +01:00
opusforlife2
2174055ef8
Update Invidious URL list in Parsing Helper 2020-11-11 15:12:31 +00:00
Isira Seneviratne
4fe28d7e3a Fix YouTube parse error when only a date is present. 2020-11-04 05:49:42 +05:30
Isira Seneviratne
4f04cfccca Switch from Calendar to OffsetDateTime in DateWrapper. 2020-11-01 06:28:54 +05:30
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
Stypox
57e7994c9e
Add some missing finals, nullables and comments 2020-10-25 08:12:41 +01:00
Stypox
d0b14644bb
[YouTube/MediaCCC] Consider dates as GMT and not as local 2020-10-24 18:41:41 +02:00
wb9688
be9a6f931c Fix parsing new ytInitialData 2020-10-16 20:27:40 +02:00
wb9688
667dce034c Only use fallback methods for clientVersion when clientVersion hasn't been successfully extracted yet 2020-07-26 13:14:25 +02:00
wb9688
f345f667e2 Extract YouTube's key 2020-07-26 12:01:59 +02:00
eb3901acee update invidious instances 2020-07-02 21:31:05 +02:00
Robin
576754982e
Update extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java
Co-authored-by: Tobias Groza <TobiGr@users.noreply.github.com>
2020-06-27 11:35:01 +02:00
Robin
b63ae93495
Added a comment
and fixed a "typo" in the method parseDurationString replacing Long with Integer.

These are not the droids you are looking for wb9688 😁
2020-06-15 11:27:44 +02:00
wb9688
33b1121fc7 Add tests for parseDurationString() 2020-05-30 17:20:54 +02:00
wb9688
e39147202c Fix YouTube video duration parsing 2020-05-30 09:31:08 +02:00
wb9688
8f71bde776 Fix bug for YT videos longer than 1000h 2020-05-28 11:34:42 +02:00
de26e00079 changed all == null || isEmpty() to isNullOrEmpty() 2020-05-11 11:40:24 +02:00
202a73516c refactor: add Utils.isNullOrEmpty() 2020-05-11 11:26:18 +02:00
bc13e0c616 Merge remote-tracking branch 'upstream/dev' into soundcloudComments 2020-05-05 14:49:21 +02:00
636c430743 refactor: create extractors and linkHandler packages for SoundCloud, move YoutubeParsingHelper to youtube package (not linkhandler anymore) 2020-04-10 10:51:05 +02:00
Christian Schabesberger
94d1eb6f32 restructure youtube service 2018-05-08 21:19:03 +02:00
Mauricio Colli
f787b375e5
Created gradle module and moved existing code to new one 2018-03-14 00:44:02 -03:00
Renamed from src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java (Browse further)