From 92a3cd37a6010abdc844f27038403aab11a16338 Mon Sep 17 00:00:00 2001 From: Tim Mann Date: Sat, 30 Jan 2021 22:50:18 -0800 Subject: [PATCH] Look harder for the description. Both tests pass now. --- youtube_dl/extractor/pac12.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/pac12.py b/youtube_dl/extractor/pac12.py index 004165d72..2a5020106 100644 --- a/youtube_dl/extractor/pac12.py +++ b/youtube_dl/extractor/pac12.py @@ -44,14 +44,18 @@ class Pac12IE(InfoExtractor): return None return self.url_result(vod_url) video_url = re.sub(r'\\', '', video_url) - title = self._html_search_regex(r'(.+?)', - webpage, 'title') if 'vod-' not in url and vod_url is not None: video_id = self._match_id(vod_url) + title = self._html_search_regex(r'(.+?)', + webpage, 'title') + description = self._og_search_description(webpage, default=None) \ + or self._search_regex(r'"description":"(?P[^"]+)"', + webpage, 'description', default="") \ + .encode('utf-8').decode('unicode_escape') return { 'id': video_id, 'title': title, - 'description': self._og_search_description(webpage), + 'description': description, 'url': video_url, 'ext': 'mp4', }