Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Consider copyright videos as not available in order to continue on error
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyPlease committed Mar 9, 2018
1 parent 3349cbb commit e19d8d1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/youtube-dl.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ var isDebug = /^\[debug\] /;
var isWarning = /^WARNING: /;
var isYouTubeRegex = /^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//;
var isNoSubsRegex = /WARNING: video doesn't have subtitles|no closed captions found/;
var videoNotAvailable = /This video is not available|This video has been removed by the user|Please sign in to view this video|This video is no longer available/;
var videoNotAvailable = new RegExp(
'This video is not available|'+
'This video has been removed by the user|'+
'Please sign in to view this video|'+
'This video is no longer available|'+
'This video contains content from'
);
var subsRegex = /--write-sub|--write-srt|--srt-lang|--all-subs/;

/**
Expand Down Expand Up @@ -417,4 +423,4 @@ ytdl.getExtractors = function getExtractors(descriptions, options, callback) {

var args = descriptions ? ['--extractor-descriptions'] : ['--list-extractors'];
call(null, args, null, options, callback);
};
};

0 comments on commit e19d8d1

Please sign in to comment.