mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-05 02:32:44 +01:00
[crunchyroll] Simplify description extraction
This commit is contained in:
parent
5214f1e31d
commit
2c740cf28d
@ -291,9 +291,8 @@ def _real_extract(self, url):
|
|||||||
r'(?s)<h1[^>]*>((?:(?!<h1).)*?<span[^>]+itemprop=["\']title["\'][^>]*>(?:(?!<h1).)+?)</h1>',
|
r'(?s)<h1[^>]*>((?:(?!<h1).)*?<span[^>]+itemprop=["\']title["\'][^>]*>(?:(?!<h1).)+?)</h1>',
|
||||||
webpage, 'video_title')
|
webpage, 'video_title')
|
||||||
video_title = re.sub(r' {2,}', ' ', video_title)
|
video_title = re.sub(r' {2,}', ' ', video_title)
|
||||||
video_description = self._html_search_regex(r'"description":"([^"]+)', webpage, 'video_description', default='')
|
video_description = self._html_search_regex(
|
||||||
if not video_description:
|
r'"description":"([^"]+)', webpage, 'video_description', default=None)
|
||||||
video_description = None
|
|
||||||
video_upload_date = self._html_search_regex(
|
video_upload_date = self._html_search_regex(
|
||||||
[r'<div>Availability for free users:(.+?)</div>', r'<div>[^<>]+<span>\s*(.+?\d{4})\s*</span></div>'],
|
[r'<div>Availability for free users:(.+?)</div>', r'<div>[^<>]+<span>\s*(.+?\d{4})\s*</span></div>'],
|
||||||
webpage, 'video_upload_date', fatal=False, flags=re.DOTALL)
|
webpage, 'video_upload_date', fatal=False, flags=re.DOTALL)
|
||||||
|
Loading…
Reference in New Issue
Block a user