projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff04d43
)
[twitter] Improve formats extraction from vmap URL (closes #28909)
author
Sergey M․
<dstftw@gmail.com>
Sat, 1 May 2021 12:00:39 +0000
(19:00 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 1 May 2021 12:00:39 +0000
(19:00 +0700)
youtube_dl/extractor/twitter.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitter.py
b/youtube_dl/extractor/twitter.py
index ed495f2975e6f32739bd55c2c3e4f268deeb01c3..cfa7a7326cbcd974f71c4cbd26bc9bc4368b831b 100644
(file)
--- 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 = []