Skip to content

Commit b05fa45

Browse files
committed
resolved review comments
1 parent c77050d commit b05fa45

3 files changed

Lines changed: 15 additions & 16 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public SuggestionExtractor getSuggestionExtractor() {
222222
public ChannelExtractor getChannelExtractor(ListLinkHandler linkHandler) throws ExtractionException {
223223
return getChannelExtractor(linkHandler, NewPipe.getPreferredLocalization());
224224
}
225-
225+
226226
public PlaylistExtractor getPlaylistExtractor(ListLinkHandler linkHandler) throws ExtractionException {
227227
return getPlaylistExtractor(linkHandler, NewPipe.getPreferredLocalization());
228228
}
@@ -300,8 +300,6 @@ public CommentsExtractor getCommentsExtractor(String url) throws ExtractionExcep
300300

301301

302302

303-
/**
304-
* figure out where the link is pointing to (a channel, video, playlist, etc.)
305303
/**
306304
* Figures out where the link is pointing to (a channel, a video, a playlist, etc.)
307305
* @param url the url on which it should be decided of which link type it is

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
package org.schabi.newpipe.extractor.services.youtube;
22

3-
import static java.util.Arrays.asList;
4-
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO;
5-
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.LIVE;
6-
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO;
7-
83
import org.schabi.newpipe.extractor.StreamingService;
94
import org.schabi.newpipe.extractor.SuggestionExtractor;
105
import org.schabi.newpipe.extractor.channel.ChannelExtractor;
@@ -38,6 +33,10 @@
3833
import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor;
3934
import org.schabi.newpipe.extractor.utils.Localization;
4035

36+
import static java.util.Arrays.asList;
37+
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO;
38+
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.LIVE;
39+
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO;
4140

4241
/*
4342
* Created by Christian Schabesberger on 23.08.15.
@@ -140,15 +139,16 @@ public SubscriptionExtractor getSubscriptionExtractor() {
140139
return new YoutubeSubscriptionExtractor(this);
141140
}
142141

143-
@Override
144-
public ListLinkHandlerFactory getCommentsLHFactory() {
145-
return YoutubeCommentsLinkHandlerFactory.getInstance();
146-
}
142+
@Override
143+
public ListLinkHandlerFactory getCommentsLHFactory() {
144+
return YoutubeCommentsLinkHandlerFactory.getInstance();
145+
}
147146

148-
@Override
149-
public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler, Localization localization) throws ExtractionException {
150-
return new YoutubeCommentsExtractor(this, urlIdHandler, localization);
151-
}
147+
@Override
148+
public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler, Localization localization)
149+
throws ExtractionException {
150+
return new YoutubeCommentsExtractor(this, urlIdHandler, localization);
151+
}
152152

153153
@Override
154154
public boolean isCommentsSupported() {

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
public class YoutubeCommentsExtractor extends CommentsExtractor {
3737

38+
// using the mobile site for comments because it loads faster and uses get requests instead of post
3839
private static final String USER_AGENT = "Mozilla/5.0 (Android 8.1.0; Mobile; rv:62.0) Gecko/62.0 Firefox/62.0";
3940
private static final Pattern YT_CLIENT_NAME_PATTERN = Pattern.compile("INNERTUBE_CONTEXT_CLIENT_NAME\\\":(.*?)[,}]");
4041

0 commit comments

Comments
 (0)