Skip to content

Commit 6e42cb8

Browse files
committed
Add support for getting uploader URL
1 parent b9d0941 commit 6e42cb8

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudStreamInfoItemExtractor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ public String getUploaderName() {
3333
return searchResult.getObject("user").getString("username");
3434
}
3535

36+
@Override
37+
public String getUploaderUrl() {
38+
return searchResult.getObject("user").getString("permalink_url");
39+
}
40+
3641
@Override
3742
public String getUploadDate() throws ParsingException {
3843
return SoundcloudParsingHelper.toDateString(searchResult.getString("created_at"));

src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamInfoItemExtractor.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ public String getUploaderName() throws ParsingException {
9494
}
9595
}
9696

97+
@Override
98+
public String getUploaderUrl() throws ParsingException {
99+
try {
100+
return item.select("div[class=\"yt-lockup-byline\"]").first()
101+
.select("a").first()
102+
.attr("href");
103+
} catch (Exception e) {
104+
throw new ParsingException("Could not get uploader", e);
105+
}
106+
}
107+
97108
@Override
98109
public String getUploadDate() throws ParsingException {
99110
try {

src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public interface StreamInfoItemExtractor extends InfoItemExtractor {
3131
long getViewCount() throws ParsingException;
3232

3333
String getUploaderName() throws ParsingException;
34+
String getUploaderUrl() throws ParsingException;
3435
String getUploadDate() throws ParsingException;
3536

3637
}

0 commit comments

Comments
 (0)