mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-27 17:08:32 +00:00
Apply suggestions from code review
Co-authored-by: N/Ame <173015200+grqz@users.noreply.github.com>
This commit is contained in:
parent
ec9f607f7f
commit
87ba39405b
@ -1,4 +1,6 @@
|
||||
from .common import InfoExtractor
|
||||
from ..utils import clean_html
|
||||
from ..utils.traversal import find_elements, traverse_obj
|
||||
|
||||
|
||||
class FilmArchivIE(InfoExtractor):
|
||||
@ -24,9 +26,17 @@ def _real_extract(self, url):
|
||||
r'<title-div[^>]*>\s*(.+?)\s*</title-div>',
|
||||
webpage, 'title')
|
||||
|
||||
description = self._html_search_regex(
|
||||
r'<div class="(?:.+?)?border-base-content[^"]*">\s*<div class="(?:.+?)?prose[^"]*">\s*<p>\s*(.+?)\s*</p>',
|
||||
webpage, 'description')
|
||||
description = traverse_obj(webpage, (
|
||||
{find_elements(
|
||||
tag='div',
|
||||
attr='class', value=r'[^\'"]*(?<=[\'"\s])border-base-content(?=[\'"\s])[^\'"]*',
|
||||
html=False, regex=True)}, ...,
|
||||
{find_elements(
|
||||
tag='div',
|
||||
attr='class', value=r'[^\'"]*(?<=[\'"\s])prose(?=[\'"\s])[^\'"]*',
|
||||
html=False, regex=True)}, ...,
|
||||
{clean_html}, any,
|
||||
))
|
||||
|
||||
og_img = self._html_search_meta('og:image', webpage, 'image URL', fatal=True)
|
||||
prefix = self._search_regex(
|
||||
|
Loading…
Reference in New Issue
Block a user