[tumblr] Fix thumbnail extraction
authorMike Col <MikeCol@gmx.net>
Mon, 27 Jan 2014 06:38:55 +0000 (07:38 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 27 Jan 2014 06:38:55 +0000 (07:38 +0100)
Signed-off-by: Philipp Hagemeister <phihag@phihag.de>
youtube_dl/extractor/tumblr.py

index abbbb9661d2c3a3924c1657b6b28a22f47c8bdd0..f7bc77c48cbc70cda5191dcca6da099f423771fc 100644 (file)
@@ -34,9 +34,11 @@ class TumblrIE(InfoExtractor):
         video_url = video.group('video_url')
         ext = video.group('ext')
 
-        video_thumbnail = self._search_regex(r'posters(.*?)\[\\x22(?P<thumb>.*?)\\x22',
+        video_thumbnail = self._search_regex(
+            r'posters.*?\[\\x22(.*?)\\x22',
             webpage, 'thumbnail', fatal=False)  # We pick the first poster
-        if video_thumbnail: video_thumbnail = video_thumbnail.replace('\\', '')
+        if video_thumbnail:
+            video_thumbnail = video_thumbnail.replace('\\\\/', '/')
 
         # The only place where you can get a title, it's not complete,
         # but searching in other places doesn't work for all videos