[vk] Handle deleted videos
authorSergey M․ <dstftw@gmail.com>
Tue, 28 Oct 2014 14:06:07 +0000 (21:06 +0700)
committerSergey M․ <dstftw@gmail.com>
Tue, 28 Oct 2014 14:06:07 +0000 (21:06 +0700)
youtube_dl/extractor/vk.py

index 918bd10988a2c49fac2fc76bb7481e1a3ed7fdf1..837c3167e839cc7c9a023a4c9ea0e2a4b1de0f6c 100644 (file)
@@ -142,6 +142,10 @@ class VKIE(InfoExtractor):
             raise ExtractorError('This video is only available for registered users, '
                 'use --username and --password options to provide account credentials.', expected=True)
 
+        if '<!>Unknown error' in info_page:
+            raise ExtractorError(
+                'Video %s does not exist' % video_id, expected=True)
+
         m_yt = re.search(r'src="(http://www.youtube.com/.*?)"', info_page)
         if m_yt is not None:
             self.to_screen('Youtube video detected')