X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Ftumblr.py;h=54436906875a727ac6f6eeb3de555f0c0cd461bf;hb=9f5809b3e80674a7d3e4afbfc3e790849cf17cad;hp=abbbb9661d2c3a3924c1657b6b28a22f47c8bdd0;hpb=c060b774467f499bc946ae024bc9fc4ecfbc6d67;p=youtube-dl diff --git a/youtube_dl/extractor/tumblr.py b/youtube_dl/extractor/tumblr.py index abbbb9661..544369068 100644 --- a/youtube_dl/extractor/tumblr.py +++ b/youtube_dl/extractor/tumblr.py @@ -9,7 +9,7 @@ from ..utils import ( class TumblrIE(InfoExtractor): - _VALID_URL = r'http://(?P.*?)\.tumblr\.com/((post)|(video))/(?P\d*)/(.*?)' + _VALID_URL = r'http://(?P.*?)\.tumblr\.com/((post)|(video))/(?P\d*)($|/)' _TEST = { 'url': 'http://tatianamaslanydaily.tumblr.com/post/54196191430/orphan-black-dvd-extra-behind-the-scenes', 'file': '54196191430.mp4', @@ -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.*?)\\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