We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06ea74c commit 7cfdaf3Copy full SHA for 7cfdaf3
1 file changed
src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamInfoItemExtractor.java
@@ -94,13 +94,23 @@ public String getUploaderName() throws ParsingException {
94
}
95
96
97
+ private static String fixRelativeUrls(String url) {
98
+ if(url == null || url.isEmpty()) return url;
99
+ if(url.startsWith("/")) {
100
+ return "https://youtube.com" + url;
101
+ } else {
102
+ return url;
103
+ }
104
105
+
106
@Override
107
public String getUploaderUrl() throws ParsingException {
108
try {
109
- return item.select("div[class=\"yt-lockup-byline\"]").first()
110
+ String url = item.select("div[class=\"yt-lockup-byline\"]").first()
111
.select("a").first()
112
.attr("href");
113
+ return fixRelativeUrls(url);
114
} catch (Exception e){}
115
116
// try this if the first didn't work
0 commit comments