X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/415fdb62500dca2e22067a05008dfbf87c75b662..8c72ec3993d7183e9c1fcd2cab445a3196ad8723:/youtube_dl/extractor/slideshare.py?ds=inline diff --git a/youtube_dl/extractor/slideshare.py b/youtube_dl/extractor/slideshare.py index 53c3c92..e89ebeb 100644 --- a/youtube_dl/extractor/slideshare.py +++ b/youtube_dl/extractor/slideshare.py @@ -4,14 +4,17 @@ import re import json from .common import InfoExtractor -from ..utils import ( +from ..compat import ( compat_urlparse, +) +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 { @@ -49,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, }