diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/Page.java b/extractor/src/main/java/org/schabi/newpipe/extractor/Page.java index e4faae778..54d908530 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/Page.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/Page.java @@ -11,32 +11,39 @@ public class Page implements Serializable { private final String id; private final List ids; private final Map cookies; + private final byte[] body; - public Page(final String url, final String id, final List ids, final Map cookies) { + public Page(final String url, final String id, final List ids, + final Map cookies, final byte[] body) { this.url = url; this.id = id; this.ids = ids; this.cookies = cookies; + this.body = body; } public Page(final String url) { - this(url, null, null, null); + this(url, null, null, null, null); } public Page(final String url, final String id) { - this(url, id, null, null); + this(url, id, null, null, null); + } + + public Page(final String url, final byte[] body) { + this(url, null, null, null, body); } public Page(final String url, final Map cookies) { - this(url, null, null, cookies); + this(url, null, null, cookies, null); } public Page(final List ids) { - this(null, null, ids, null); + this(null, null, ids, null, null); } public Page(final List ids, final Map cookies) { - this(null, null, ids, cookies); + this(null, null, ids, cookies, null); } public String getUrl() { @@ -59,4 +66,8 @@ public class Page implements Serializable { return page != null && (!isNullOrEmpty(page.getUrl()) || !isNullOrEmpty(page.getIds())); } + + public byte[] getBody() { + return body; + } }