mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-25 01:01:39 +00:00
[dailymotion] Convert width and height fields from strings to integers
This commit is contained in:
parent
652bee05f0
commit
553f6e4633
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ from ..utils import (
|
|||
get_element_by_id,
|
||||
orderedSet,
|
||||
str_to_int,
|
||||
int_or_none,
|
||||
|
||||
ExtractorError,
|
||||
)
|
||||
|
@ -124,7 +125,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor, SubtitlesInfoExtractor):
|
|||
if video_url is not None:
|
||||
m_size = re.search(r'H264-(\d+)x(\d+)', video_url)
|
||||
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:
|
||||
width, height = None, None
|
||||
formats.append({
|
||||
|
|
Loading…
Reference in a new issue