diff --git a/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamInfoItemExtractor.java b/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamInfoItemExtractor.java index 6b436603b..cfea37b90 100644 --- a/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamInfoItemExtractor.java +++ b/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamInfoItemExtractor.java @@ -33,6 +33,11 @@ public class SoundcloudStreamInfoItemExtractor implements StreamInfoItemExtracto return searchResult.getObject("user").getString("username"); } + @Override + public String getUploaderUrl() { + return searchResult.getObject("user").getString("permalink_url"); + } + @Override public String getUploadDate() throws ParsingException { return SoundcloudParsingHelper.toDateString(searchResult.getString("created_at")); diff --git a/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamInfoItemExtractor.java b/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamInfoItemExtractor.java index 8b48c1f28..2541e07d3 100644 --- a/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamInfoItemExtractor.java +++ b/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamInfoItemExtractor.java @@ -94,6 +94,17 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor { } } + @Override + public String getUploaderUrl() throws ParsingException { + try { + return item.select("div[class=\"yt-lockup-byline\"]").first() + .select("a").first() + .attr("href"); + } catch (Exception e) { + throw new ParsingException("Could not get uploader", e); + } + } + @Override public String getUploadDate() throws ParsingException { try { diff --git a/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java b/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java index 17d3fd5bd..5d52fef66 100644 --- a/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java +++ b/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java @@ -31,6 +31,7 @@ public interface StreamInfoItemExtractor extends InfoItemExtractor { long getViewCount() throws ParsingException; String getUploaderName() throws ParsingException; + String getUploaderUrl() throws ParsingException; String getUploadDate() throws ParsingException; }