File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import com .grack .nanojson .JsonObject ;
44import com .grack .nanojson .JsonParser ;
55import com .grack .nanojson .JsonParserException ;
6-
76import org .schabi .newpipe .extractor .Page ;
87import org .schabi .newpipe .extractor .StreamingService ;
98import org .schabi .newpipe .extractor .channel .ChannelExtractor ;
1918import org .schabi .newpipe .extractor .utils .JsonUtils ;
2019import org .schabi .newpipe .extractor .utils .Utils ;
2120
22- import java .io .IOException ;
23-
2421import javax .annotation .Nonnull ;
22+ import java .io .IOException ;
2523
26- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .COUNT_KEY ;
27- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .ITEMS_PER_PAGE ;
28- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .START_KEY ;
29- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .collectStreamsFrom ;
24+ import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .*;
3025import static org .schabi .newpipe .extractor .utils .Utils .isNullOrEmpty ;
3126
3227public class PeertubeAccountExtractor extends ChannelExtractor {
@@ -92,7 +87,7 @@ public String getParentChannelAvatarUrl() {
9287 @ Override
9388 public InfoItemsPage <StreamInfoItem > getInitialPage () throws IOException , ExtractionException {
9489 return getPage (new Page (
95- getUrl () + "/videos?" + START_KEY + "=0&" + COUNT_KEY + "=" + ITEMS_PER_PAGE ));
90+ baseUrl + "/api/v1/" + getId () + "/videos?" + START_KEY + "=0&" + COUNT_KEY + "=" + ITEMS_PER_PAGE ));
9691 }
9792
9893 @ Override
Original file line number Diff line number Diff line change 33import com .grack .nanojson .JsonObject ;
44import com .grack .nanojson .JsonParser ;
55import com .grack .nanojson .JsonParserException ;
6-
76import org .schabi .newpipe .extractor .Page ;
87import org .schabi .newpipe .extractor .StreamingService ;
98import org .schabi .newpipe .extractor .channel .ChannelExtractor ;
1918import org .schabi .newpipe .extractor .utils .JsonUtils ;
2019import org .schabi .newpipe .extractor .utils .Utils ;
2120
22- import java .io .IOException ;
23-
2421import javax .annotation .Nonnull ;
22+ import java .io .IOException ;
2523
26- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .COUNT_KEY ;
27- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .ITEMS_PER_PAGE ;
28- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .START_KEY ;
29- import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .collectStreamsFrom ;
24+ import static org .schabi .newpipe .extractor .services .peertube .PeertubeParsingHelper .*;
3025import static org .schabi .newpipe .extractor .utils .Utils .isNullOrEmpty ;
3126
3227
@@ -99,7 +94,7 @@ public String getParentChannelAvatarUrl() {
9994 @ Override
10095 public InfoItemsPage <StreamInfoItem > getInitialPage () throws IOException , ExtractionException {
10196 return getPage (new Page (
102- getUrl () + "/videos?" + START_KEY + "=0&" + COUNT_KEY + "=" + ITEMS_PER_PAGE ));
97+ baseUrl + "/api/v1/" + getId () + "/videos?" + START_KEY + "=0&" + COUNT_KEY + "=" + ITEMS_PER_PAGE ));
10398 }
10499
105100 @ Override
Original file line number Diff line number Diff line change @@ -89,10 +89,9 @@ public void testAvatarUrl() throws ParsingException {
8989 assertIsSecureUrl (extractor .getAvatarUrl ());
9090 }
9191
92- @ Ignore
9392 @ Test
94- public void testBannerUrl () throws ParsingException {
95- assertIsSecureUrl (extractor .getBannerUrl ());
93+ public void testBannerUrl () {
94+ assertNull (extractor .getBannerUrl ());
9695 }
9796
9897 @ Test
Original file line number Diff line number Diff line change @@ -104,10 +104,9 @@ public void testAvatarUrl() throws ParsingException {
104104 assertIsSecureUrl (extractor .getAvatarUrl ());
105105 }
106106
107- @ Ignore
108107 @ Test
109108 public void testBannerUrl () throws ParsingException {
110- assertIsSecureUrl (extractor .getBannerUrl ());
109+ assertNull (extractor .getBannerUrl ());
111110 }
112111
113112 @ Test
You can’t perform that action at this time.
0 commit comments