-
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.
Merge pull request #314 from wb9688/remove-getnextpageurl
Next page stuff
- Loading branch information
Showing
53 changed files
with
778 additions
and
932 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
52 changes: 52 additions & 0 deletions
52
extractor/src/main/java/org/schabi/newpipe/extractor/Page.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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package org.schabi.newpipe.extractor; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty; | ||
|
||
public class Page implements Serializable { | ||
private final String url; | ||
private final List<String> ids; | ||
private final Map<String, String> cookies; | ||
|
||
public Page(final String url, final List<String> ids, final Map<String, String> cookies) { | ||
this.url = url; | ||
this.ids = ids; | ||
this.cookies = cookies; | ||
} | ||
|
||
public Page(final String url) { | ||
this(url, null, null); | ||
} | ||
|
||
public Page(final String url, final Map<String, String> cookies) { | ||
this(url, null, cookies); | ||
} | ||
|
||
public Page(final List<String> ids) { | ||
this(null, ids, null); | ||
} | ||
|
||
public Page(final List<String> ids, final Map<String, String> cookies) { | ||
this(null, ids, cookies); | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public List<String> getIds() { | ||
return ids; | ||
} | ||
|
||
public Map<String, String> getCookies() { | ||
return cookies; | ||
} | ||
|
||
public static boolean isValid(final Page page) { | ||
return page != null && (!isNullOrEmpty(page.getUrl()) | ||
|| !isNullOrEmpty(page.getIds())); | ||
} | ||
} |
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
Oops, something went wrong.