Skip to content

Commit

Permalink
[vimeo] improve album videos id extraction(closes #22599)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Oct 15, 2019
1 parent 30eb05c commit 974311b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions youtube_dl/extractor/vimeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ class VimeoAlbumIE(VimeoChannelIE):
def _fetch_page(self, album_id, authorizaion, hashed_pass, page):
api_page = page + 1
query = {
'fields': 'link',
'fields': 'link,uri',
'page': api_page,
'per_page': self._PAGE_SIZE,
}
Expand All @@ -953,7 +953,9 @@ def _fetch_page(self, album_id, authorizaion, hashed_pass, page):
link = video.get('link')
if not link:
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):
album_id = self._match_id(url)
Expand Down

0 comments on commit 974311b

Please sign in to comment.