Commit Graph

29 Commits

Author SHA1 Message Date
AudricV 1556adbb2d
[YouTube] Fix hashtags links extraction and escape text in attribute descriptions + HTML links
webCommandMetadata object is contained inside a commandMetadata one, so it is
not accessible from the root of the navigationEndpoint object.

The corresponding statement has been moved at the bottom of the specific
endpoints parsing, as the webCommandMetadata object is present almost
everywhere, otherwise URLs of some endpoints would have be changed, such as
uploader URLs (from channel IDs to handles).

As no ParsingException is now thrown by getUrlFromNavigationEndpoint, and so by
getTextFromObject, getUrlFromObject and getTextAtKey, the methods which were
catching ParsingExceptions thrown by these methods had to be updated.

URLs got in the HTML version of getTextFromObject are now escaped properly to
provide valid HTML to clients. This has been also done for attribute
descriptions, with the description text for this type of descriptions.

As YouTube descriptions are in HTML format (except for the fallback on the JSON
player response, which is plain text and only happens when there is no visual
metadata or a breaking change), all URLs returned are escaped, so tests which
are testing presence of URLs with escaped characters had to be updated (it was
only the case for YoutubeStreamExtractorDefaultTest.DescriptionTestUnboxing).
2023-02-26 18:43:36 +01:00
TobiGr 72573932cf [YouTube] Fix NPE in search when getting channel items without subscriber count 2023-01-24 23:03:45 +01:00
ThetaDev 016623131e docs: update comment in YoutubeChannelInfoItemExtractor 2022-11-29 19:06:03 +01:00
ThetaDev 5daabd1793 fix: #976 search subscriber count extraction with channel handles 2022-11-22 02:17:10 +01:00
Stypox 740a37a2de [YouTube] Fix checkstyle issues 2022-03-26 19:42:40 +01:00
bopol 1a322ad8ed Add uploader verified by service extraction 2021-02-18 16:36:40 +01:00
Xiang Rong Lin 822cf307f7 [Youtube] Add _ITEMS constants and improve code style
Move thumbnail id exctraction code to getThumbnailUrlFromId
Add test for "My mix" detection to service tests
Use ITEM_COUNT_UNKNOWN everywhere instead of -1 and add some tests
2020-12-12 20:30:57 +01:00
bopol bc13e0c616 Merge remote-tracking branch 'upstream/dev' into soundcloudComments 2020-05-05 14:49:21 +02:00
wb9688 979c5a7502 Use our fork of nanojson 2020-04-17 19:36:42 +02:00
bopol 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
Mauricio Colli 921bf30bb7
[YouTube] Add check for channel items with no video count in search 2020-03-21 15:55:39 -03:00
Mauricio Colli b7f8001a49
[YouTube] Add check for channel items without description in search 2020-03-21 15:55:38 -03:00
Mauricio Colli 9b7999fe54
[YouTube] Check if channel item has subscription count in search 2020-03-21 15:55:37 -03:00
wb9688 612ec06839 Actually fix thumbnail URLs starting with // 2020-02-28 09:36:33 +01:00
wb9688 94a2d5be46 Fix thumbnail URLs starting with // 2020-02-27 19:08:46 +01:00
wb9688 365b0329f3 Implement getTextFromObject() function 2020-02-27 17:39:23 +01:00
wb9688 8ebd971648 Fix channel descriptions consisting of multiple parts 2020-02-27 10:06:35 +01:00
wb9688 c7360e4a46 Fix getThumbnailUrl() in YoutubeChannelInfoItemExtractor 2020-02-25 21:51:30 +01:00
wb9688 51fb26625a Implement getSubscriberCount() in YoutubeChannelInfoItemExtractor 2020-02-25 21:51:30 +01:00
wb9688 4462cbe3f1 Reimplement YoutubePlaylistInfoItemExtractor 2020-02-25 21:51:30 +01:00
wb9688 8aea4d445b Reimplement YoutubeChannelInfoItemExtractor 2020-02-25 21:51:30 +01:00
Stypox d1cd341592 Change comment 2019-09-25 08:32:00 +02:00
Stypox 35921345d9 Use Exception instead of Throwable (more consistent) 2019-09-25 08:32:00 +02:00
Stypox 94e7f0d3ab Fix fallback method is not tried on exception
in YoutubeChannelInfoItem.getUrl()
2019-09-25 08:32:00 +02:00
Stypox b09e402d4f
Fix wrong regex when channel id is at the end of the url
It had no "&" at the end.
2019-08-12 16:55:39 +02:00
Stypox 6aa69a2df8
Fix inconsistency in youtube channel urls
Urls from the youtube search extractor were "https://www.youtube.com/user/NAME" instead of "https://www.youtube.com/channel/ID". This fixes TeamNewPipe/NewPipe#2167
2019-08-12 11:57:29 +02:00
Christian Schabesberger 217d13b102 fix wrong subscription count 2018-09-11 15:14:22 +02:00
Mauricio Colli 0400ae026f
Fix channels with subscription count disabled
Related: TeamNewPipe/NewPipe#1649
2018-09-03 22:37:31 -03:00
Christian Schabesberger 94d1eb6f32 restructure youtube service 2018-05-08 21:19:03 +02:00