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: 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 .common import InfoExtractor
|
||||||
|
from ..utils import clean_html
|
||||||
|
from ..utils.traversal import find_elements, traverse_obj
|
||||||
|
|
||||||
|
|
||||||
class FilmArchivIE(InfoExtractor):
|
class FilmArchivIE(InfoExtractor):
|
||||||
@ -24,9 +26,17 @@ def _real_extract(self, url):
|
|||||||
r'<title-div[^>]*>\s*(.+?)\s*</title-div>',
|
r'<title-div[^>]*>\s*(.+?)\s*</title-div>',
|
||||||
webpage, 'title')
|
webpage, 'title')
|
||||||
|
|
||||||
description = self._html_search_regex(
|
description = traverse_obj(webpage, (
|
||||||
r'<div class="(?:.+?)?border-base-content[^"]*">\s*<div class="(?:.+?)?prose[^"]*">\s*<p>\s*(.+?)\s*</p>',
|
{find_elements(
|
||||||
webpage, 'description')
|
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)
|
og_img = self._html_search_meta('og:image', webpage, 'image URL', fatal=True)
|
||||||
prefix = self._search_regex(
|
prefix = self._search_regex(
|
||||||
|
Loading…
Reference in New Issue
Block a user