1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-09 18:26:05 +08:00

[vimeo] Add support for extracting licenses

This will extract the URL to the relevant Creative Commons license, if
the video is licensed using one of those. Otherwise it'll be `None`
since vimeo does not specify a license.

Fixes #8726
This commit is contained in:
Kunal Mehta 2017-01-29 23:36:56 -08:00
parent 4719419951
commit 809ce36a23

View File

@ -575,6 +575,9 @@ class VimeoIE(VimeoBaseInfoExtractor):
like_count = None
comment_count = None
# Extract license
license = self._search_regex(r'<link [^>]+rel="license" href="(.*?)">', webpage, 'license', default=None)
formats = []
download_request = sanitized_Request('https://vimeo.com/%s?action=load_download_config' % video_id, headers={
'X-Requested-With': 'XMLHttpRequest'})
@ -609,6 +612,7 @@ class VimeoIE(VimeoBaseInfoExtractor):
'view_count': view_count,
'like_count': like_count,
'comment_count': comment_count,
'license': license,
})
return info_dict