[twitter] Improve formats extraction from vmap URL (closes #28909)

This commit is contained in:
=?UTF-8?q?Sergey=20M=E2=80=A4?= 2021-05-03 23:00:18 +02:00 committed by Lauren Liberda
parent ceab7dc7ec
commit 36bc893bd8

View file

@ -19,6 +19,7 @@ from ..utils import (
strip_or_none,
unified_timestamp,
update_url_query,
url_or_none,
xpath_text,
)
@ -52,6 +53,9 @@ class TwitterBaseIE(InfoExtractor):
return [f]
def _extract_formats_from_vmap_url(self, vmap_url, video_id):
vmap_url = url_or_none(vmap_url)
if not vmap_url:
return []
vmap_data = self._download_xml(vmap_url, video_id)
formats = []
urls = []