mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
Remove low importance comments
This commit is contained in:
parent
46561ecd6c
commit
ab3b80d92a
@ -51,12 +51,9 @@ class CanalUIE(InfoExtractor):
|
|||||||
video['url'] = self._html_search_regex(r'file: "(.*?\.mp4)",', webpage, 'url')
|
video['url'] = self._html_search_regex(r'file: "(.*?\.mp4)",', webpage, 'url')
|
||||||
video['ext'] = 'mp4'
|
video['ext'] = 'mp4'
|
||||||
|
|
||||||
# Thumbnail
|
|
||||||
video['thumbnail'] = self._og_search_thumbnail(webpage, default=None)
|
video['thumbnail'] = self._og_search_thumbnail(webpage, default=None)
|
||||||
# Description
|
|
||||||
description_regex = r'<div class="description fleft">.*?<p>\s*(.*?)\s*</p>.*?</div>'
|
description_regex = r'<div class="description fleft">.*?<p>\s*(.*?)\s*</p>.*?</div>'
|
||||||
video['description'] = self._html_search_regex(description_regex, webpage, 'description', flags=DOTALL, default=None)
|
video['description'] = self._html_search_regex(description_regex, webpage, 'description', flags=DOTALL, default=None)
|
||||||
# Other fields
|
|
||||||
for field in [
|
for field in [
|
||||||
['duration', 'Durée du programme', '(\d+) min'],
|
['duration', 'Durée du programme', '(\d+) min'],
|
||||||
['creator', 'Auteur\(s\)', '(.*?)'],
|
['creator', 'Auteur\(s\)', '(.*?)'],
|
||||||
@ -64,9 +61,7 @@ class CanalUIE(InfoExtractor):
|
|||||||
]:
|
]:
|
||||||
regex = r'<dd><span style="font-weight:bold;" >{0}</span> : {1} </dd>'.format(field[1], field[2])
|
regex = r'<dd><span style="font-weight:bold;" >{0}</span> : {1} </dd>'.format(field[1], field[2])
|
||||||
video[field[0]] = self._html_search_regex(regex, webpage, field[0], flags=DOTALL, default=None)
|
video[field[0]] = self._html_search_regex(regex, webpage, field[0], flags=DOTALL, default=None)
|
||||||
# Duration
|
|
||||||
video['duration'] = int_or_none(video['duration'], invscale=60)
|
video['duration'] = int_or_none(video['duration'], invscale=60)
|
||||||
# Release date
|
|
||||||
date = video['release_date'].split(' ')
|
date = video['release_date'].split(' ')
|
||||||
video["release_date"] = "{0}{1}{2}".format(date[2], month_by_name(unescapeHTML(date[1]).lower(), 'fr'), date[0])
|
video["release_date"] = "{0}{1}{2}".format(date[2], month_by_name(unescapeHTML(date[1]).lower(), 'fr'), date[0])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user