mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-11 02:52:59 +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:
parent
4719419951
commit
809ce36a23
@ -575,6 +575,9 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
|||||||
like_count = None
|
like_count = None
|
||||||
comment_count = None
|
comment_count = None
|
||||||
|
|
||||||
|
# Extract license
|
||||||
|
license = self._search_regex(r'<link [^>]+rel="license" href="(.*?)">', webpage, 'license', default=None)
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
download_request = sanitized_Request('https://vimeo.com/%s?action=load_download_config' % video_id, headers={
|
download_request = sanitized_Request('https://vimeo.com/%s?action=load_download_config' % video_id, headers={
|
||||||
'X-Requested-With': 'XMLHttpRequest'})
|
'X-Requested-With': 'XMLHttpRequest'})
|
||||||
@ -609,6 +612,7 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
|||||||
'view_count': view_count,
|
'view_count': view_count,
|
||||||
'like_count': like_count,
|
'like_count': like_count,
|
||||||
'comment_count': comment_count,
|
'comment_count': comment_count,
|
||||||
|
'license': license,
|
||||||
})
|
})
|
||||||
|
|
||||||
return info_dict
|
return info_dict
|
||||||
|
Loading…
Reference in New Issue
Block a user