Skip to content

Commit fef71ae

Browse files
committed
roleback using href for description links
1 parent 3aa7ff6 commit fef71ae

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ private String parseHtmlAndGetFullLinks(String descriptionHtml)
176176
if(link != null) {
177177
// if link is null the a tag is a hashtag.
178178
// They refer to the youtube search. We do not handle them.
179-
a.attr("abs:href", link);
179+
a.text(link);
180180

181181
} else if(redirectLink.toString().contains("watch?v=")) {
182182
// Another posibility is that this link is pointing to another video
183183
// we need to put the redirectLink in here explicitly in order to add the domain part to the link.
184-
a.attr("abs:href", redirectLink.toString());
184+
a.text(redirectLink.toString());
185185
}
186186
}
187187
}

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamExtractorDefaultTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void testGetDescription() throws ParsingException {
7777
@Test
7878
public void testGetFullLinksInDescriptlion() throws ParsingException {
7979
assertTrue(extractor.getDescription().contains("http://smarturl.it/SubscribeAdele?IQid=yt"));
80-
assertTrue(extractor.getDescription().contains("http://smarturl.it/SubscribeAdele?IQi..."));
80+
assertFalse(extractor.getDescription().contains("http://smarturl.it/SubscribeAdele?IQi..."));
8181
}
8282

8383
@Test

0 commit comments

Comments
 (0)