diff options
author | sepro <4618135+seproDev@users.noreply.github.com> | 2024-06-12 01:09:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 01:09:58 +0200 |
commit | add96eb9f84cfffe85682bf2fb85135746994ee8 (patch) | |
tree | 583f209506aa01b2afa3933e504426de575fc43c /yt_dlp/extractor/slideshare.py | |
parent | db50f19d76c6870a5a13d0cab9287d684fd7449a (diff) |
[cleanup] Add more ruff rules (#10149)
Authored by: seproDev
Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com>
Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
Diffstat (limited to 'yt_dlp/extractor/slideshare.py')
-rw-r--r-- | yt_dlp/extractor/slideshare.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/yt_dlp/extractor/slideshare.py b/yt_dlp/extractor/slideshare.py index ab9dad0ec..302b6e15c 100644 --- a/yt_dlp/extractor/slideshare.py +++ b/yt_dlp/extractor/slideshare.py @@ -1,9 +1,7 @@ import json +import urllib.parse from .common import InfoExtractor -from ..compat import ( - compat_urlparse, -) from ..utils import ( ExtractorError, get_element_by_id, @@ -32,12 +30,12 @@ class SlideshareIE(InfoExtractor): webpage, 'slideshare object') info = json.loads(slideshare_obj) if info['slideshow']['type'] != 'video': - raise ExtractorError('Webpage type is "%s": only video extraction is supported for Slideshare' % info['slideshow']['type'], expected=True) + raise ExtractorError('Webpage type is "{}": only video extraction is supported for Slideshare'.format(info['slideshow']['type']), expected=True) doc = info['doc'] bucket = info['jsplayer']['video_bucket'] ext = info['jsplayer']['video_extension'] - video_url = compat_urlparse.urljoin(bucket, doc + '-SD.' + ext) + video_url = urllib.parse.urljoin(bucket, doc + '-SD.' + ext) description = get_element_by_id('slideshow-description-paragraph', webpage) or self._html_search_regex( r'(?s)<p[^>]+itemprop="description"[^>]*>(.+?)</p>', webpage, 'description', fatal=False) |