X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/af478477605bdf3f5d57562035885cfee905f379..291f6705b350d9f813b12efb37b7963555758994:/youtube_dl/extractor/slideshare.py?ds=inline diff --git a/youtube_dl/extractor/slideshare.py b/youtube_dl/extractor/slideshare.py index 9c62825..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') + description = get_element_by_id('slideshow-description-paragraph', webpage) or self._html_search_regex( + r'(?s)]+itemprop="description"[^>]*>(.+?)
', webpage, + 'description', fatal=False) return { '_type': 'video', @@ -48,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, }