Improve testChannelUrl()
This commit is contained in:
parent
bfe3eb1409
commit
3e4d2fd64e
1 changed files with 8 additions and 3 deletions
|
@ -92,13 +92,18 @@ public class YoutubeSearchExtractorChannelOnlyTest extends YoutubeSearchExtracto
|
||||||
if (item instanceof ChannelInfoItem) {
|
if (item instanceof ChannelInfoItem) {
|
||||||
ChannelInfoItem channel = (ChannelInfoItem) item;
|
ChannelInfoItem channel = (ChannelInfoItem) item;
|
||||||
|
|
||||||
if (channel.getSubscriberCount() > 5e7 && channel.getName().equals("PewDiePie")) { // the real PewDiePie
|
if (channel.getSubscriberCount() > 1e8) { // the real PewDiePie
|
||||||
assertEquals("https://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw", item.getUrl());
|
assertEquals("https://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw", item.getUrl());
|
||||||
} else {
|
break;
|
||||||
assertThat(item.getUrl(), CoreMatchers.startsWith("https://www.youtube.com/channel/"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (InfoItem item : itemsPage.getItems()) {
|
||||||
|
if (item instanceof ChannelInfoItem) {
|
||||||
|
assertThat(item.getUrl(), CoreMatchers.startsWith("https://www.youtube.com/channel/"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue