projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
755ff8d
)
[vidme] Check for deleted videos
author
Lukáš Lalinský
<lukas@oxygene.sk>
Mon, 26 Oct 2015 13:42:17 +0000
(14:42 +0100)
committer
Lukáš Lalinský
<lukas@oxygene.sk>
Mon, 26 Oct 2015 13:42:17 +0000
(14:42 +0100)
youtube_dl/extractor/vidme.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vidme.py
b/youtube_dl/extractor/vidme.py
index eb5cde761af54d0d33b6ca99e746963afbc756de..3d63ed4f08930275ee725c68a520368721e1ed10 100644
(file)
--- a/
youtube_dl/extractor/vidme.py
+++ b/
youtube_dl/extractor/vidme.py
@@
-101,6
+101,10
@@
class VidmeIE(InfoExtractor):
# suspended
'url': 'https://vid.me/Ox3G',
'only_matching': True,
# suspended
'url': 'https://vid.me/Ox3G',
'only_matching': True,
+ }, {
+ # deleted
+ 'url': 'https://vid.me/KTPm',
+ 'only_matching': True,
}, {
# no formats in the API response
'url': 'https://vid.me/e5g',
}, {
# no formats in the API response
'url': 'https://vid.me/e5g',
@@
-143,6
+147,11
@@
class VidmeIE(InfoExtractor):
video = response['video']
video = response['video']
+ if video.get('state') == 'deleted':
+ raise ExtractorError(
+ 'Vidme said: Sorry, this video has been deleted.',
+ expected=True)
+
if video.get('state') in ('user-disabled', 'suspended'):
raise ExtractorError(
'Vidme said: This video has been suspended either due to a copyright claim, '
if video.get('state') in ('user-disabled', 'suspended'):
raise ExtractorError(
'Vidme said: This video has been suspended either due to a copyright claim, '