-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
1,895 additions
and
1,101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
extractor/src/main/java/org/schabi/newpipe/extractor/ServiceList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.schabi.newpipe.extractor; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.schabi.newpipe.extractor.services.media_ccc.MediaCCCService; | ||
import org.schabi.newpipe.extractor.services.peertube.PeertubeService; | ||
import org.schabi.newpipe.extractor.services.soundcloud.SoundcloudService; | ||
import org.schabi.newpipe.extractor.services.youtube.YoutubeService; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/* | ||
* Copyright (C) Christian Schabesberger 2018 <[email protected]> | ||
* ServiceList.java is part of NewPipe. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
package org.schabi.newpipe.extractor; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.schabi.newpipe.extractor.channel.ChannelExtractor; | ||
import org.schabi.newpipe.extractor.comments.CommentsExtractor; | ||
import org.schabi.newpipe.extractor.exceptions.ExtractionException; | ||
import org.schabi.newpipe.extractor.exceptions.ParsingException; | ||
import org.schabi.newpipe.extractor.feed.FeedExtractor; | ||
import org.schabi.newpipe.extractor.kiosk.KioskList; | ||
import org.schabi.newpipe.extractor.linkhandler.LinkHandler; | ||
import org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory; | ||
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; | ||
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory; | ||
import org.schabi.newpipe.extractor.linkhandler.SearchQueryHandler; | ||
import org.schabi.newpipe.extractor.linkhandler.SearchQueryHandlerFactory; | ||
import org.schabi.newpipe.extractor.linkhandler.*; | ||
import org.schabi.newpipe.extractor.localization.ContentCountry; | ||
import org.schabi.newpipe.extractor.localization.Localization; | ||
import org.schabi.newpipe.extractor.localization.TimeAgoParser; | ||
|
@@ -24,6 +17,10 @@ | |
import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor; | ||
import org.schabi.newpipe.extractor.suggestion.SuggestionExtractor; | ||
|
||
import javax.annotation.Nullable; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/* | ||
* Copyright (C) Christian Schabesberger 2018 <[email protected]> | ||
* StreamingService.java is part of NewPipe. | ||
|
@@ -65,7 +62,7 @@ public ServiceInfo(String name, List<MediaCapability> mediaCapabilities) { | |
public String getName() { | ||
return name; | ||
} | ||
|
||
public List<MediaCapability> getMediaCapabilities() { | ||
return mediaCapabilities; | ||
} | ||
|
@@ -116,7 +113,7 @@ public ServiceInfo getServiceInfo() { | |
public String toString() { | ||
return serviceId + ":" + serviceInfo.getName(); | ||
} | ||
|
||
public abstract String getBaseUrl(); | ||
|
||
/*////////////////////////////////////////////////////////////////////////// | ||
|
@@ -173,6 +170,19 @@ public String toString() { | |
*/ | ||
public abstract SubscriptionExtractor getSubscriptionExtractor(); | ||
|
||
/** | ||
* This method decides which strategy will be chosen to fetch the feed. In YouTube, for example, a separate feed | ||
* exists which is lightweight and made specifically to be used like this. | ||
* <p> | ||
* In services which there's no other way to retrieve them, null should be returned. | ||
* | ||
* @return a {@link FeedExtractor} instance or null. | ||
*/ | ||
@Nullable | ||
public FeedExtractor getFeedExtractor(String url) throws ExtractionException { | ||
return null; | ||
} | ||
|
||
/** | ||
* Must create a new instance of a KioskList implementation. | ||
* @return a new KioskList instance | ||
|
@@ -253,12 +263,12 @@ public StreamExtractor getStreamExtractor(String url) throws ExtractionException | |
|
||
public CommentsExtractor getCommentsExtractor(String url) throws ExtractionException { | ||
ListLinkHandlerFactory llhf = getCommentsLHFactory(); | ||
if(null == llhf) { | ||
if (llhf == null) { | ||
return null; | ||
} | ||
return getCommentsExtractor(llhf.fromUrl(url)); | ||
} | ||
|
||
/*////////////////////////////////////////////////////////////////////////// | ||
// Utils | ||
//////////////////////////////////////////////////////////////////////////*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.