[ATTTechChannel] Fix extractor

This commit is contained in:
Adrian Heine 2021-01-17 12:27:22 +01:00
parent d4564afc70
commit e6ed10d7f5

View File

@ -29,16 +29,22 @@ class ATTTechChannelIE(InfoExtractor):
webpage = self._download_webpage(url, display_id)
video_url = self._search_regex(
[
r"url\s*:\s*'(rtmp://[^']+)'",
r"(https://tcmedia.akamaized.net/techchannel/.+?.m3u8)",
],
webpage, 'video URL')
video_id = self._search_regex(
r'mediaid\s*=\s*(\d+)',
webpage, 'video id', fatal=False)
title = self._og_search_title(webpage)
description = self._og_search_description(webpage)
thumbnail = self._og_search_thumbnail(webpage)
title = self._og_search_title(webpage, default=None) or self._search_regex(
r'<title>(.*?)</title>', webpage, 'title')
description = self._og_search_description(webpage, default=None) or self._html_search_meta(
'description', webpage, fatal=False)
thumbnail = self._og_search_thumbnail(webpage, default=None) or self._search_regex(
r"poster='(.+?)'", webpage, 'thumbnail', fatal=False)
upload_date = unified_strdate(self._search_regex(
r'[Rr]elease\s+date:\s*(\d{1,2}/\d{1,2}/\d{4})',
webpage, 'upload date', fatal=False), False)