diff options
author | Sergey M․ <[email protected]> | 2021-05-01 19:00:39 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2021-05-01 19:00:39 +0700 |
commit | d1b9a5e2eff1c075b38815a3d2b25eb8b3f626bb (patch) | |
tree | 035dfae9bff84c26444be4e52367bb3a43ebe1f3 | |
parent | ff04d43c469e4cf8c14ba3e2e79da0d35ef3c7db (diff) | |
download | youtube-dl-d1b9a5e2eff1c075b38815a3d2b25eb8b3f626bb.tar.gz youtube-dl-d1b9a5e2eff1c075b38815a3d2b25eb8b3f626bb.zip |
[twitter] Improve formats extraction from vmap URL (closes #28909)
-rw-r--r-- | youtube_dl/extractor/twitter.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/twitter.py b/youtube_dl/extractor/twitter.py index ed495f297..cfa7a7326 100644 --- a/youtube_dl/extractor/twitter.py +++ b/youtube_dl/extractor/twitter.py @@ -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 = [] |