mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-06 06:25:22 +02:00
[dailymotion] Convert width and height fields from strings to integers
This commit is contained in:
parent
652bee05f0
commit
553f6e4633
@ -12,6 +12,7 @@
|
|||||||
get_element_by_id,
|
get_element_by_id,
|
||||||
orderedSet,
|
orderedSet,
|
||||||
str_to_int,
|
str_to_int,
|
||||||
|
int_or_none,
|
||||||
|
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
)
|
)
|
||||||
@ -124,7 +125,7 @@ def _real_extract(self, url):
|
|||||||
if video_url is not None:
|
if video_url is not None:
|
||||||
m_size = re.search(r'H264-(\d+)x(\d+)', video_url)
|
m_size = re.search(r'H264-(\d+)x(\d+)', video_url)
|
||||||
if m_size is not None:
|
if m_size is not None:
|
||||||
width, height = m_size.group(1), m_size.group(2)
|
width, height = map(int_or_none, (m_size.group(1), m_size.group(2)))
|
||||||
else:
|
else:
|
||||||
width, height = None, None
|
width, height = None, None
|
||||||
formats.append({
|
formats.append({
|
||||||
|
Loading…
Reference in New Issue
Block a user