mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-23 06:35:51 -07:00
Work-around duration parsing pending fix to utils.parse_duration
This commit is contained in:
parent
a72aca5667
commit
0945174fa4
1 changed files with 8 additions and 1 deletions
|
@ -7,7 +7,7 @@ from .common import InfoExtractor
|
|||
from .brightcove import BrightcoveNewIE
|
||||
|
||||
from ..compat import compat_str
|
||||
from ..utils import (
|
||||
from ..utils import ( # noqa: F401
|
||||
base_url,
|
||||
clean_html,
|
||||
determine_ext,
|
||||
|
@ -209,6 +209,13 @@ class ITVIE(InfoExtractor):
|
|||
})
|
||||
self._remove_duplicate_formats(thumbnails)
|
||||
|
||||
# TODO: remove this once utils.py is updated
|
||||
def parse_duration(s): # noqa: F811
|
||||
from re import sub
|
||||
from ..utils import parse_duration as utils_parse_duration
|
||||
return utils_parse_duration(
|
||||
sub(r':(\d{3,})$', r'.\1', s or ''))
|
||||
|
||||
return merge_dicts({
|
||||
'id': video_id,
|
||||
'title': self._html_search_meta(['og:title', 'twitter:title'], webpage),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue