projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
065c4b2
)
[motherless] Detect friends only videos
author
Sergey M․
<dstftw@gmail.com>
Mon, 21 Mar 2016 16:24:42 +0000
(22:24 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 21 Mar 2016 16:24:42 +0000
(22:24 +0600)
youtube_dl/extractor/motherless.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/motherless.py
b/youtube_dl/extractor/motherless.py
index ad04b12cd761f53ae90e31a0a230635cf6782fcc..5e1a8a71a93aa28962d7f260af966d10cf8e9f7a 100644
(file)
--- a/
youtube_dl/extractor/motherless.py
+++ b/
youtube_dl/extractor/motherless.py
@@
-69,6
+69,9
@@
class MotherlessIE(InfoExtractor):
">The page you're looking for cannot be found.<")):
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(
r'id="view-upload-title">\s+([^<]+)<', webpage, 'title')
video_url = self._html_search_regex(