]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/generic] Add support for ok embeds (#8619)
authorSergey M․ <dstftw@gmail.com>
Sun, 21 Feb 2016 03:51:54 +0000 (09:51 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 21 Feb 2016 03:51:54 +0000 (09:51 +0600)
youtube_dl/extractor/generic.py

index 45adbb7a3947c9f3f6a3522864ac5fe370cdc254..c6bf8d270f2dc07c3f0e1e3bf8732804393437a1 100644 (file)
@@ -1573,6 +1573,11 @@ class GenericIE(InfoExtractor):
         if mobj is not None:
             return self.url_result(mobj.group('url'), 'VK')
 
+        # Look for embedded Odnoklassniki player
+        mobj = re.search(r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:odnoklassniki|ok)\.ru/videoembed/.+?)\1', webpage)
+        if mobj is not None:
+            return self.url_result(mobj.group('url'), 'Odnoklassniki')
+
         # Look for embedded ivi player
         mobj = re.search(r'<embed[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?ivi\.ru/video/player.+?)\1', webpage)
         if mobj is not None: