summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/izlesene.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit137f07c27a88b07df57df5b2cdebebe3c7722bac (patch)
tree4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/izlesene.py
parentAdding debian version 2024.05.27-1. (diff)
downloadyt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz
yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/izlesene.py')
-rw-r--r--yt_dlp/extractor/izlesene.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/yt_dlp/extractor/izlesene.py b/yt_dlp/extractor/izlesene.py
index 5cdf870..cf2a269 100644
--- a/yt_dlp/extractor/izlesene.py
+++ b/yt_dlp/extractor/izlesene.py
@@ -1,8 +1,6 @@
+import urllib.parse
+
from .common import InfoExtractor
-from ..compat import (
- compat_str,
- compat_urllib_parse_unquote,
-)
from ..utils import (
determine_ext,
float_or_none,
@@ -33,7 +31,7 @@ class IzleseneIE(InfoExtractor):
'upload_date': '20140702',
'duration': 95.395,
'age_limit': 0,
- }
+ },
},
{
'url': 'http://www.izlesene.com/video/tarkan-dortmund-2006-konseri/17997',
@@ -48,14 +46,14 @@ class IzleseneIE(InfoExtractor):
'upload_date': '20061112',
'duration': 253.666,
'age_limit': 0,
- }
+ },
},
]
def _real_extract(self, url):
video_id = self._match_id(url)
- webpage = self._download_webpage('http://www.izlesene.com/video/%s' % video_id, video_id)
+ webpage = self._download_webpage(f'http://www.izlesene.com/video/{video_id}', video_id)
video = self._parse_json(
self._search_regex(
@@ -67,14 +65,14 @@ class IzleseneIE(InfoExtractor):
formats = []
for stream in video['media']['level']:
source_url = stream.get('source')
- if not source_url or not isinstance(source_url, compat_str):
+ if not source_url or not isinstance(source_url, str):
continue
ext = determine_ext(url, 'mp4')
quality = stream.get('value')
height = int_or_none(quality)
formats.append({
- 'format_id': '%sp' % quality if quality else 'sd',
- 'url': compat_urllib_parse_unquote(source_url),
+ 'format_id': f'{quality}p' if quality else 'sd',
+ 'url': urllib.parse.unquote(source_url),
'ext': ext,
'height': height,
})