1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-28 01:18:30 +00:00

Apply suggestions from code review

Co-authored-by: doe1080 <98906116+doe1080@users.noreply.github.com>
This commit is contained in:
delta 2025-06-20 11:52:21 +02:00 committed by GitHub
parent 814a798f77
commit 4ecdf49afc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,10 @@
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import clean_html from ..utils import clean_html
from ..utils.traversal import find_elements, traverse_obj from ..utils.traversal import (
find_element,
find_elements,
traverse_obj,
)
class FilmArchivIE(InfoExtractor): class FilmArchivIE(InfoExtractor):
@ -22,8 +26,6 @@ def _real_extract(self, url):
media_id = self._match_id(url) media_id = self._match_id(url)
webpage = self._download_webpage(url, media_id) webpage = self._download_webpage(url, media_id)
title = traverse_obj(webpage, ({find_elements(tag='title-div')}, {clean_html}))
description = traverse_obj(webpage, ( description = traverse_obj(webpage, (
{find_elements( {find_elements(
tag='div', tag='div',
@ -45,7 +47,7 @@ def _real_extract(self, url):
return { return {
'id': media_id, 'id': media_id,
'title': title, 'title': traverse_obj(webpage, ({find_element(tag='title-div')}, {clean_html})),
'description': description, 'description': description,
'thumbnail': f'https://cdn.filmarchiv.at/{prefix}/poster.jpg', 'thumbnail': f'https://cdn.filmarchiv.at/{prefix}/poster.jpg',
'formats': formats, 'formats': formats,