Skip to content

Commit 1be3d71

Browse files
committed
Return more entry metadata in flat playlist
1 parent a598f62 commit 1be3d71

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

yt_dlp/extractor/piramidetv.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,16 @@ class PiramideTVChannelIE(InfoExtractor):
8888
def _entries(self, channel_name):
8989
videos = self._download_json(
9090
f'https://hermes.piramide.tv/channel/list/{channel_name}/date/100000', channel_name)
91-
for video_id in traverse_obj(videos, ('videos', ..., 'id', {str})):
92-
yield self.url_result(smuggle_url(
93-
f'https://piramide.tv/video/{video_id}', {'force_noplaylist': True}))
91+
for video in videos.get('videos', []):
92+
if video_id := video.get('id'):
93+
yield self.url_result(smuggle_url(
94+
f'https://piramide.tv/video/{video_id}', {'force_noplaylist': True}),
95+
**traverse_obj(video, {
96+
'id': ('id', {str}),
97+
'title': ('title', {str}),
98+
'description': ('description', {str}),
99+
'webpage_url': ('id', {str}, {lambda v: f'https://piramide.tv/video/{v}'}),
100+
}))
94101

95102
def _real_extract(self, url):
96103
channel_name = self._match_id(url)

0 commit comments

Comments
 (0)