summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRemita Amine <[email protected]>2021-03-12 10:48:58 +0100
committerRemita Amine <[email protected]>2021-03-12 10:48:58 +0100
commitef414343e5fa2bc4fddae3097ecde5a8e32c2d4c (patch)
treeb699ec539217855dff289ed5ccf0d914d415334f
parent43d986acd8bf7247725fc9de34648c0eda560daf (diff)
downloadyoutube-dl-ef414343e5fa2bc4fddae3097ecde5a8e32c2d4c.tar.gz
youtube-dl-ef414343e5fa2bc4fddae3097ecde5a8e32c2d4c.zip
[peertube] improve thumbnail extraction(closes #28419)
-rw-r--r--youtube_dl/extractor/peertube.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/peertube.py b/youtube_dl/extractor/peertube.py
index 32ff51653..d9b13adc2 100644
--- a/youtube_dl/extractor/peertube.py
+++ b/youtube_dl/extractor/peertube.py
@@ -599,11 +599,13 @@ class PeerTubeIE(InfoExtractor):
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)),
@@ -621,5 +623,6 @@ class PeerTubeIE(InfoExtractor):
'tags': try_get(video, lambda x: x['tags'], list),
'categories': categories,
'formats': formats,
- 'subtitles': subtitles
+ 'subtitles': subtitles,
+ 'webpage_url': webpage_url,
}