diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampStreamExtractor.java index b6ed0a5da..b33670ecc 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampStreamExtractor.java @@ -96,7 +96,7 @@ public class BandcampStreamExtractor extends StreamExtractor { @Nullable @Override public String getTextualUploadDate() { - return current.getString("release_date"); + return current.getString("publish_date").replaceAll(" \\d+:\\d+:\\d+ .+", ""); } @Nullable diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamExtractorTest.java index c4d268226..c280bcb77 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/bandcamp/BandcampStreamExtractorTest.java @@ -60,6 +60,11 @@ public class BandcampStreamExtractorTest { assertTrue(url.contains("://f4.bcbits.com/img/") && url.endsWith(".jpg")); } + @Test + public void testUploadDate() { + assertEquals("27 Sep 2019", extractor.getTextualUploadDate()); + } + @Test public void testNoArtistProfilePicture() throws ExtractionException { assertEquals("", Bandcamp.getStreamExtractor("https://powertothequeerkids.bandcamp.com/track/human-nature").getUploaderAvatarUrl());