Skip to content

Commit 867ca1c

Browse files
committed
Fix failing YouTube comments tests
The comment function has been disabled for the video on which we ran the test. We are testing the comments of a different video now.
1 parent acebbaf commit 867ca1c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeCommentsExtractorTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ public class YoutubeCommentsExtractorTest {
2727
public static void setUp() throws Exception {
2828
NewPipe.init(Downloader.getInstance(), new Localization("GB", "en"));
2929
extractor = (YoutubeCommentsExtractor) YouTube
30-
.getCommentsExtractor("https://www.youtube.com/watch?v=rrgFN3AxGfs");
30+
.getCommentsExtractor("https://www.youtube.com/watch?v=D00Au7k3i6o");
3131
}
3232

3333
@Test
3434
public void testGetComments() throws IOException, ExtractionException {
35-
boolean result = false;
35+
boolean result;
3636
InfoItemsPage<CommentsInfoItem> comments = extractor.getInitialPage();
37-
result = findInComments(comments, "i should really be in the top comment.lol");
37+
result = findInComments(comments, "s1ck m3m3");
3838

3939
while (comments.hasNextPage() && !result) {
4040
comments = extractor.getPage(comments.getNextPageUrl());
41-
result = findInComments(comments, "i should really be in the top comment.lol");
41+
result = findInComments(comments, "s1ck m3m3");
4242
}
4343

4444
assertTrue(result);
@@ -47,14 +47,14 @@ public void testGetComments() throws IOException, ExtractionException {
4747
@Test
4848
public void testGetCommentsFromCommentsInfo() throws IOException, ExtractionException {
4949
boolean result = false;
50-
CommentsInfo commentsInfo = CommentsInfo.getInfo("https://www.youtube.com/watch?v=rrgFN3AxGfs");
51-
assertTrue("what the fuck am i doing with my life.wmv".equals(commentsInfo.getName()));
52-
result = findInComments(commentsInfo.getRelatedItems(), "i should really be in the top comment.lol");
50+
CommentsInfo commentsInfo = CommentsInfo.getInfo("https://www.youtube.com/watch?v=D00Au7k3i6o");
51+
assertTrue("what the fuck am i doing with my life".equals(commentsInfo.getName()));
52+
result = findInComments(commentsInfo.getRelatedItems(), "s1ck m3m3");
5353

5454
String nextPage = commentsInfo.getNextPageUrl();
5555
while (!StringUtil.isBlank(nextPage) && !result) {
5656
InfoItemsPage<CommentsInfoItem> moreItems = CommentsInfo.getMoreItems(YouTube, commentsInfo, nextPage);
57-
result = findInComments(moreItems.getItems(), "i should really be in the top comment.lol");
57+
result = findInComments(moreItems.getItems(), "s1ck m3m3");
5858
nextPage = moreItems.getNextPageUrl();
5959
}
6060

0 commit comments

Comments
 (0)