X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/415fdb62500dca2e22067a05008dfbf87c75b662..5a9d00a5190582368d533f12db7638e735d7f7c8:/youtube_dl/extractor/slideshare.py 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, }