]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/phoenix.py
[ie/generic] Add `key_query` extractor-arg
[yt-dlp.git] / yt_dlp / extractor / phoenix.py
index 5fa133afeacdb06c4466f35dd72a791183706b1a..63c256019e984190a9773ba84292d4cf1c727226 100644 (file)
@@ -2,7 +2,6 @@
 
 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 @@ def _real_extract(self, url):
         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 @@ def _real_extract(self, url):
                 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 @@ def _real_extract(self, url):
         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 @@ def _real_extract(self, url):
         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 = []