-Fixed Youtube page extraction on flagged / offensive content urls.

This commit is contained in:
John Zhen Mo 2018-03-01 16:31:36 -08:00
parent 4cf4ee394f
commit b4206479cb

View file

@ -538,13 +538,16 @@ public class YoutubeStreamExtractor extends StreamExtractor {
private static final String CONTENT = "content"; private static final String CONTENT = "content";
private static final String DECRYPTION_FUNC_NAME = "decrypt"; private static final String DECRYPTION_FUNC_NAME = "decrypt";
private static final String VERIFIED_URL_PARAMS = "&has_verified=1&bpctr=9999999999";
private volatile String decryptionCode = ""; private volatile String decryptionCode = "";
private String pageHtml = null; private String pageHtml = null;
private String getPageHtml(Downloader downloader) throws IOException, ExtractionException{ private String getPageHtml(Downloader downloader) throws IOException, ExtractionException {
final String verifiedUrl = getCleanUrl() + VERIFIED_URL_PARAMS;
if (pageHtml == null) { if (pageHtml == null) {
pageHtml = downloader.download(getCleanUrl()); pageHtml = downloader.download(verifiedUrl);
} }
return pageHtml; return pageHtml;
} }