2017-06-29 23:42:55 +05:30
|
|
|
package org.schabi.newpipe.extractor;
|
|
|
|
|
|
|
|
import org.schabi.newpipe.extractor.stream.StreamInfoItemCollector;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
public abstract class Extractor implements Serializable {
|
|
|
|
private final int serviceId;
|
|
|
|
private final String url;
|
|
|
|
private final UrlIdHandler urlIdHandler;
|
|
|
|
private final StreamInfoItemCollector previewInfoCollector;
|
|
|
|
|
|
|
|
public Extractor(UrlIdHandler urlIdHandler, int serviceId, String url) {
|
|
|
|
this.urlIdHandler = urlIdHandler;
|
|
|
|
this.serviceId = serviceId;
|
|
|
|
this.url = url;
|
2017-07-11 08:38:03 +05:30
|
|
|
this.previewInfoCollector = new StreamInfoItemCollector(serviceId);
|
2017-06-29 23:42:55 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
public String getUrl() {
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
|
|
|
|
public UrlIdHandler getUrlIdHandler() {
|
|
|
|
return urlIdHandler;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getServiceId() {
|
|
|
|
return serviceId;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected StreamInfoItemCollector getStreamPreviewInfoCollector() {
|
|
|
|
return previewInfoCollector;
|
|
|
|
}
|
|
|
|
}
|