mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-15 20:48:58 +00:00
[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>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import urllib.parse
|
||||
|
||||
from .common import InfoExtractor
|
||||
from .once import OnceIE
|
||||
from ..compat import compat_urllib_parse_unquote
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
int_or_none,
|
||||
@@ -52,7 +53,7 @@ class VoxMediaVolumeIE(OnceIE):
|
||||
return info
|
||||
|
||||
for provider_video_type in ('youtube', 'brightcove'):
|
||||
provider_video_id = video_data.get('%s_id' % provider_video_type)
|
||||
provider_video_id = video_data.get(f'{provider_video_type}_id')
|
||||
if not provider_video_id:
|
||||
continue
|
||||
if provider_video_type == 'brightcove':
|
||||
@@ -60,7 +61,7 @@ class VoxMediaVolumeIE(OnceIE):
|
||||
else:
|
||||
info.update({
|
||||
'_type': 'url_transparent',
|
||||
'url': provider_video_id if provider_video_type == 'youtube' else '%s:%s' % (provider_video_type, provider_video_id),
|
||||
'url': provider_video_id if provider_video_type == 'youtube' else f'{provider_video_type}:{provider_video_id}',
|
||||
'ie_key': provider_video_type.capitalize(),
|
||||
})
|
||||
return info
|
||||
@@ -172,7 +173,7 @@ class VoxMediaIE(InfoExtractor):
|
||||
|
||||
def _real_extract(self, url):
|
||||
display_id = self._match_id(url)
|
||||
webpage = compat_urllib_parse_unquote(self._download_webpage(url, display_id))
|
||||
webpage = urllib.parse.unquote(self._download_webpage(url, display_id))
|
||||
|
||||
def create_entry(provider_video_id, provider_video_type, title=None, description=None):
|
||||
video_url = {
|
||||
|
||||
Reference in New Issue
Block a user