From 34faf85e9f7c6a48f9f2379f3af0fbf4b6f2f70e Mon Sep 17 00:00:00 2001 From: sepro Date: Mon, 20 Jan 2025 07:31:24 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> --- yt_dlp/extractor/piramidetv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/piramidetv.py b/yt_dlp/extractor/piramidetv.py index b9520932685e..29afa9b4673e 100644 --- a/yt_dlp/extractor/piramidetv.py +++ b/yt_dlp/extractor/piramidetv.py @@ -57,11 +57,11 @@ def _extract_video(self, video_id): def _entries(self, video_id): visited = set() while True: + visited.add(video_id) next_video, info = self._extract_video(video_id) yield info if not next_video or next_video in visited: break - visited.add(next_video) video_id = next_video def _real_extract(self, url): @@ -87,7 +87,7 @@ def _entries(self, channel_name): f'https://hermes.piramide.tv/channel/list/{channel_name}/date/100000', channel_name) for video in traverse_obj(videos, ('videos', lambda _, v: v['id'])): yield self.url_result(smuggle_url( - f"https://piramide.tv/video/{video['id']}", {'force_noplaylist': True}), + f'https://piramide.tv/video/{video["id"]}', {'force_noplaylist': True}), **traverse_obj(video, { 'id': ('id', {str}), 'title': ('title', {str}),