Upgrade featured playlist urls to https
This commit is contained in:
parent
c12ef3a02d
commit
932d094d6a
2 changed files with 7 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
package org.schabi.newpipe.extractor.services.bandcamp.extractors;
|
package org.schabi.newpipe.extractor.services.bandcamp.extractors;
|
||||||
|
|
||||||
import com.grack.nanojson.JsonObject;
|
import com.grack.nanojson.JsonObject;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
|
||||||
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItemExtractor;
|
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItemExtractor;
|
||||||
|
|
||||||
import static org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampExtractorHelper.getImageUrl;
|
import static org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampExtractorHelper.getImageUrl;
|
||||||
|
@ -31,7 +30,7 @@ public class BandcampPlaylistInfoItemFeaturedExtractor implements PlaylistInfoIt
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
return featuredStory.getString("item_url");
|
return featuredStory.getString("item_url").replaceAll("http://", "https://");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -37,4 +37,10 @@ public class BandcampFeaturedExtractorTest {
|
||||||
assertTrue(list.size() > 1);
|
assertTrue(list.size() > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testHttps() throws ExtractionException, IOException {
|
||||||
|
List<PlaylistInfoItem> list = extractor.getInitialPage().getItems();
|
||||||
|
assertTrue(list.get(0).getUrl().contains("https://"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue