summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/egghead.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
commitfd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch)
treee1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/egghead.py
parentReleasing progress-linux version 2024.05.27-1~progress7.99u1. (diff)
downloadyt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz
yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/egghead.py')
-rw-r--r--yt_dlp/extractor/egghead.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/yt_dlp/extractor/egghead.py b/yt_dlp/extractor/egghead.py
index c94f3f8..62d2e54 100644
--- a/yt_dlp/extractor/egghead.py
+++ b/yt_dlp/extractor/egghead.py
@@ -1,5 +1,4 @@
from .common import InfoExtractor
-from ..compat import compat_str
from ..utils import (
determine_ext,
int_or_none,
@@ -13,7 +12,7 @@ class EggheadBaseIE(InfoExtractor):
def _call_api(self, path, video_id, resource, fatal=True):
return self._download_json(
'https://app.egghead.io/api/v1/' + path,
- video_id, 'Downloading %s JSON' % resource, fatal=fatal)
+ video_id, f'Downloading {resource} JSON', fatal=fatal)
class EggheadCourseIE(EggheadBaseIE):
@@ -46,7 +45,7 @@ class EggheadCourseIE(EggheadBaseIE):
continue
lesson_id = lesson.get('id')
if lesson_id:
- lesson_id = compat_str(lesson_id)
+ lesson_id = str(lesson_id)
entries.append(self.url_result(
lesson_url, ie=EggheadLessonIE.ie_key(), video_id=lesson_id))
@@ -55,7 +54,7 @@ class EggheadCourseIE(EggheadBaseIE):
playlist_id = course.get('id')
if playlist_id:
- playlist_id = compat_str(playlist_id)
+ playlist_id = str(playlist_id)
return self.playlist_result(
entries, playlist_id, course.get('title'),
@@ -98,7 +97,7 @@ class EggheadLessonIE(EggheadBaseIE):
lesson = self._call_api(
'lessons/' + display_id, display_id, 'lesson')
- lesson_id = compat_str(lesson['id'])
+ lesson_id = str(lesson['id'])
title = lesson['title']
formats = []
@@ -129,6 +128,6 @@ class EggheadLessonIE(EggheadBaseIE):
'view_count': int_or_none(lesson.get('plays_count')),
'tags': try_get(lesson, lambda x: x['tag_list'], list),
'series': try_get(
- lesson, lambda x: x['series']['title'], compat_str),
+ lesson, lambda x: x['series']['title'], str),
'formats': formats,
}