Merge pull request #5692 from yan12125/fix-embedthumbnailpp
authorYen Chi Hsuan <yan12125@gmail.com>
Thu, 14 May 2015 04:35:58 +0000 (12:35 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Thu, 14 May 2015 04:35:58 +0000 (12:35 +0800)
Use thumbnails downloaded by YoutubeDL in EmbedThumbnailPP

youtube_dl/extractor/byutv.py
youtube_dl/extractor/odnoklassniki.py

index 6252be05b7f4b57787152b4edae5378675a96847..3b2de517e53da39e06912ce1a97c4aafe7fa250e 100644 (file)
@@ -16,7 +16,7 @@ class BYUtvIE(InfoExtractor):
             'ext': 'mp4',
             'description': 'md5:5438d33774b6bdc662f9485a340401cc',
             'title': 'Season 5 Episode 5',
-            'thumbnail': 're:^https?://.*promo.*'
+            'thumbnail': 're:^https?://.*\.jpg$'
         },
         'params': {
             'skip_download': True,
index 155d0ee6a834fa6fb551900e0d0c35dcf0007a5c..fbc521d1aae02077ae62c5cd0a6c5f9cdcff014a 100644 (file)
@@ -6,6 +6,7 @@ from ..utils import (
     unified_strdate,
     int_or_none,
     qualities,
+    unescapeHTML,
 )
 
 
@@ -36,8 +37,8 @@ class OdnoklassnikiIE(InfoExtractor):
         webpage = self._download_webpage(url, video_id)
 
         player = self._parse_json(
-            self._search_regex(
-                r"OKVideo\.start\(({.+?})\s*,\s*'VideoAutoplay_player'", webpage, 'player'),
+            unescapeHTML(self._search_regex(
+                r'data-attributes="([^"]+)"', webpage, 'player')),
             video_id)
 
         metadata = self._parse_json(player['flashvars']['metadata'], video_id)