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/phoenix.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/phoenix.py')
-rw-r--r-- | yt_dlp/extractor/phoenix.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/yt_dlp/extractor/phoenix.py b/yt_dlp/extractor/phoenix.py index 5fa133afe..63c256019 100644 --- a/yt_dlp/extractor/phoenix.py +++ b/yt_dlp/extractor/phoenix.py @@ -2,7 +2,6 @@ import re from .youtube import YoutubeIE from .zdf import ZDFBaseIE -from ..compat import compat_str from ..utils import ( int_or_none, merge_dicts, @@ -64,7 +63,7 @@ class PhoenixIE(ZDFBaseIE): article_id = self._match_id(url) article = self._download_json( - 'https://www.phoenix.de/response/id/%s' % article_id, article_id, + f'https://www.phoenix.de/response/id/{article_id}', article_id, 'Downloading article JSON') video = article['absaetze'][0] @@ -76,7 +75,7 @@ class PhoenixIE(ZDFBaseIE): video_id, ie=YoutubeIE.ie_key(), video_id=video_id, video_title=title) - video_id = compat_str(video.get('basename') or video.get('content')) + video_id = str(video.get('basename') or video.get('content')) details = self._download_json( 'https://www.phoenix.de/php/mediaplayer/data/beitrags_details.php', @@ -91,7 +90,7 @@ class PhoenixIE(ZDFBaseIE): content_id = details['tracking']['nielsen']['content']['assetid'] info = self._extract_ptmd( - 'https://tmd.phoenix.de/tmd/2/ngplayer_2_3/vod/ptmd/phoenix/%s' % content_id, + f'https://tmd.phoenix.de/tmd/2/ngplayer_2_3/vod/ptmd/phoenix/{content_id}', content_id, None, url) duration = int_or_none(try_get( @@ -99,7 +98,7 @@ class PhoenixIE(ZDFBaseIE): timestamp = unified_timestamp(details.get('editorialDate')) series = try_get( details, lambda x: x['tracking']['nielsen']['content']['program'], - compat_str) + str) episode = title if details.get('contentType') == 'episode' else None thumbnails = [] |