[SoundCloud] Fix extractors built from next playlist pages
They didn't have the information to calculate another next page url. So now `nextPageUrl` contains a full link with all video ids, and `getPage` takes the first part of the url (containing 15 streams) and produces another `nextPageUrl` with the remaining streams. Also add a test for this.
This commit is contained in:
@@ -234,6 +234,15 @@ public class SoundcloudPlaylistExtractorTest {
|
||||
public void testGetPageInNewExtractor() throws Exception {
|
||||
final PlaylistExtractor newExtractor = SoundCloud.getPlaylistExtractor(extractor.getUrl());
|
||||
defaultTestGetPageInNewExtractor(extractor, newExtractor);
|
||||
String page1 = newExtractor.getNextPageUrl();
|
||||
defaultTestMoreItems(newExtractor); // there has to be another page
|
||||
String page2 = newExtractor.getNextPageUrl();
|
||||
defaultTestMoreItems(newExtractor); // and another one
|
||||
String page3 = newExtractor.getNextPageUrl();
|
||||
|
||||
assertNotEquals("Same pages", page1, page2);
|
||||
assertNotEquals("Same pages", page2, page3);
|
||||
assertNotEquals("Same pages", page3, page1);
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user