mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-22 02:15:12 +00:00
[vimeo] Handle Assertions Error when trying to get the description
In some pages the html tags are not closed, python 2.6 cannot handle it.
This commit is contained in:
parent
aa32314d09
commit
9c2ade40de
1 changed files with 11 additions and 3 deletions
|
@ -148,9 +148,17 @@ def _real_extract(self, url, new_video=True):
|
||||||
_, video_thumbnail = sorted((int(width), t_url) for (width, t_url) in config["video"]["thumbs"].items())[-1]
|
_, video_thumbnail = sorted((int(width), t_url) for (width, t_url) in config["video"]["thumbs"].items())[-1]
|
||||||
|
|
||||||
# Extract video description
|
# Extract video description
|
||||||
video_description = get_element_by_attribute("itemprop", "description", webpage)
|
video_description = None
|
||||||
if video_description: video_description = clean_html(video_description)
|
try:
|
||||||
else: video_description = u''
|
video_description = get_element_by_attribute("itemprop", "description", webpage)
|
||||||
|
if video_description: video_description = clean_html(video_description)
|
||||||
|
except AssertionError as err:
|
||||||
|
# On some pages like (http://player.vimeo.com/video/54469442) the
|
||||||
|
# html tags are not closed, python 2.6 cannot handle it
|
||||||
|
if err.args[0] == 'we should not get here!':
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
# Extract upload date
|
# Extract upload date
|
||||||
video_upload_date = None
|
video_upload_date = None
|
||||||
|
|
Loading…
Reference in a new issue