Skip to content

Commit

Permalink
[peertube] improve thumbnail extraction(closes #28419)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Mar 12, 2021
1 parent 43d986a commit ef41434
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions youtube_dl/extractor/peertube.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,11 +599,13 @@ def channel_data(field, type_):
else:
age_limit = None

webpage_url = 'https://%s/videos/watch/%s' % (host, video_id)

return {
'id': video_id,
'title': title,
'description': description,
'thumbnail': urljoin(url, video.get('thumbnailPath')),
'thumbnail': urljoin(webpage_url, video.get('thumbnailPath')),
'timestamp': unified_timestamp(video.get('publishedAt')),
'uploader': account_data('displayName', compat_str),
'uploader_id': str_or_none(account_data('id', int)),
Expand All @@ -621,5 +623,6 @@ def channel_data(field, type_):
'tags': try_get(video, lambda x: x['tags'], list),
'categories': categories,
'formats': formats,
'subtitles': subtitles
'subtitles': subtitles,
'webpage_url': webpage_url,
}

0 comments on commit ef41434

Please sign in to comment.