forked from minhngoc25a/youtube-dl
[motherless] Detect friends only videos
This commit is contained in:
parent
065c4b27bf
commit
ff5873b72d
|
@ -69,6 +69,9 @@ class MotherlessIE(InfoExtractor):
|
||||||
">The page you're looking for cannot be found.<")):
|
">The page you're looking for cannot be found.<")):
|
||||||
raise ExtractorError('Video %s does not exist' % video_id, expected=True)
|
raise ExtractorError('Video %s does not exist' % video_id, expected=True)
|
||||||
|
|
||||||
|
if '>The content you are trying to view is for friends only.' in webpage:
|
||||||
|
raise ExtractorError('Video %s is for friends only' % video_id, expected=True)
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'id="view-upload-title">\s+([^<]+)<', webpage, 'title')
|
r'id="view-upload-title">\s+([^<]+)<', webpage, 'title')
|
||||||
video_url = self._html_search_regex(
|
video_url = self._html_search_regex(
|
||||||
|
|
Loading…
Reference in New Issue