1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 08:34:32 +01:00

[vimeo] improve album videos id extraction(closes #22599)

This commit is contained in:
Remita Amine 2019-10-15 21:01:59 +01:00
parent 30eb05cb41
commit 974311b5aa

View File

@ -938,7 +938,7 @@ class VimeoAlbumIE(VimeoChannelIE):
def _fetch_page(self, album_id, authorizaion, hashed_pass, page): def _fetch_page(self, album_id, authorizaion, hashed_pass, page):
api_page = page + 1 api_page = page + 1
query = { query = {
'fields': 'link', 'fields': 'link,uri',
'page': api_page, 'page': api_page,
'per_page': self._PAGE_SIZE, 'per_page': self._PAGE_SIZE,
} }
@ -953,7 +953,9 @@ class VimeoAlbumIE(VimeoChannelIE):
link = video.get('link') link = video.get('link')
if not link: if not link:
continue continue
yield self.url_result(link, VimeoIE.ie_key(), VimeoIE._match_id(link)) uri = video.get('uri')
video_id = self._search_regex(r'/videos/(\d+)', uri, 'video_id', default=None) if uri else None
yield self.url_result(link, VimeoIE.ie_key(), video_id)
def _real_extract(self, url): def _real_extract(self, url):
album_id = self._match_id(url) album_id = self._match_id(url)