|
1 | 1 | package org.schabi.newpipe.extractor.services.youtube; |
2 | 2 |
|
3 | 3 | import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO; |
| 4 | +import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.BULLET_COMMENTS; |
4 | 5 | import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.COMMENTS; |
5 | 6 | import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.LIVE; |
6 | 7 | import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO; |
7 | 8 |
|
8 | 9 | import org.schabi.newpipe.extractor.StreamingService; |
9 | 10 | import org.schabi.newpipe.extractor.channel.ChannelExtractor; |
10 | 11 | import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor; |
| 12 | +import org.schabi.newpipe.extractor.bulletComments.BulletCommentsExtractor; |
11 | 13 | import org.schabi.newpipe.extractor.comments.CommentsExtractor; |
12 | 14 | import org.schabi.newpipe.extractor.exceptions.ExtractionException; |
13 | 15 | import org.schabi.newpipe.extractor.feed.FeedExtractor; |
|
25 | 27 | import org.schabi.newpipe.extractor.search.SearchExtractor; |
26 | 28 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeChannelExtractor; |
27 | 29 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeChannelTabExtractor; |
| 30 | +import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeBulletCommentsExtractor; |
28 | 31 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeCommentsExtractor; |
29 | 32 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeFeedExtractor; |
30 | 33 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeMixPlaylistExtractor; |
|
42 | 45 | import org.schabi.newpipe.extractor.services.youtube.extractors.kiosk.YoutubeTrendingPodcastsEpisodesExtractor; |
43 | 46 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeChannelLinkHandlerFactory; |
44 | 47 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeChannelTabLinkHandlerFactory; |
| 48 | +import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeBulletCommentsLinkHandlerFactory; |
45 | 49 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeCommentsLinkHandlerFactory; |
46 | 50 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubeLiveLinkHandlerFactory; |
47 | 51 | import org.schabi.newpipe.extractor.services.youtube.linkHandler.YoutubePlaylistLinkHandlerFactory; |
|
82 | 86 | */ |
83 | 87 |
|
84 | 88 | public class YoutubeService extends StreamingService { |
| 89 | + public WatchDataCache watchDataCache = new WatchDataCache(); |
85 | 90 |
|
86 | 91 | public YoutubeService(final int id) { |
87 | | - super(id, "YouTube", EnumSet.of(AUDIO, VIDEO, LIVE, COMMENTS)); |
| 92 | + super(id, "YouTube", EnumSet.of(AUDIO, VIDEO, LIVE, COMMENTS, BULLET_COMMENTS)); |
88 | 93 | } |
89 | 94 |
|
90 | 95 | @Override |
@@ -258,6 +263,17 @@ public CommentsExtractor getCommentsExtractor(final ListLinkHandler urlIdHandler |
258 | 263 | return new YoutubeCommentsExtractor(this, urlIdHandler); |
259 | 264 | } |
260 | 265 |
|
| 266 | + @Override |
| 267 | + public ListLinkHandlerFactory getBulletCommentsLHFactory() { |
| 268 | + return YoutubeBulletCommentsLinkHandlerFactory.getInstance(); |
| 269 | + } |
| 270 | + |
| 271 | + @Override |
| 272 | + public BulletCommentsExtractor getBulletCommentsExtractor(final ListLinkHandler linkHandler) |
| 273 | + throws ExtractionException { |
| 274 | + return new YoutubeBulletCommentsExtractor(this, linkHandler, watchDataCache); |
| 275 | + } |
| 276 | + |
261 | 277 | /*////////////////////////////////////////////////////////////////////////// |
262 | 278 | // Localization |
263 | 279 | //////////////////////////////////////////////////////////////////////////*/ |
|
0 commit comments