X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fslideshare.py;h=e89ebebe7567ebb0abae4a15b21b100339c64b44;hb=2391941f283a1107b01f9df76a8b0e521a5abe3b;hp=e7d776e7bd8bd3334ff0da1203cd91d52508a6ef;hpb=1cc79574fc5df21bf35dccf61eac0e9e75ed8d20;p=youtube-dl diff --git a/youtube_dl/extractor/slideshare.py b/youtube_dl/extractor/slideshare.py index e7d776e7b..e89ebebe7 100644 --- a/youtube_dl/extractor/slideshare.py +++ b/youtube_dl/extractor/slideshare.py @@ -9,11 +9,12 @@ from ..compat import ( ) from ..utils import ( ExtractorError, + get_element_by_id, ) class SlideshareIE(InfoExtractor): - _VALID_URL = r'https?://www\.slideshare\.net/[^/]+?/(?P
]*>(.*?)
', webpage, + description = get_element_by_id('slideshow-description-paragraph', webpage) or self._html_search_regex( + r'(?s)]+itemprop="description"[^>]*>(.+?)
', webpage, 'description', fatal=False) return { @@ -51,5 +52,5 @@ class SlideshareIE(InfoExtractor): 'ext': ext, 'url': video_url, 'thumbnail': info['slideshow']['pin_image_url'], - 'description': description, + 'description': description.strip() if description else None, }