mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 00:00:48 +01:00
[onionstudios] Fix extraction
This commit is contained in:
parent
41c0d2f8cb
commit
53429e6551
@ -49,19 +49,21 @@ def _real_extract(self, url):
|
|||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
title = self._search_regex(
|
title = self._search_regex(
|
||||||
r'share_title\s*=\s*"([^"]+)"', webpage, 'title')
|
r'share_title\s*=\s*(["\'])(?P<title>[^\1]+?)\1',
|
||||||
|
webpage, 'title', group='title')
|
||||||
description = self._search_regex(
|
description = self._search_regex(
|
||||||
r'share_description\s*=\s*"([^"]+)"', webpage,
|
r'share_description\s*=\s*(["\'])(?P<description>[^\1]+?)\1',
|
||||||
'description', default=None)
|
webpage, 'description', default=None, group='description')
|
||||||
thumbnail = self._search_regex(
|
thumbnail = self._search_regex(
|
||||||
r'poster="([^"]+)"', webpage, 'thumbnail', default=False)
|
r'poster\s*=\s*(["\'])(?P<thumbnail>[^\1]+?)\1',
|
||||||
|
webpage, 'thumbnail', default=False, group='thumbnail')
|
||||||
|
|
||||||
uploader_id = self._search_regex(
|
uploader_id = self._search_regex(
|
||||||
r'twitter_handle\s*=\s*"([^"]+)"',
|
r'twitter_handle\s*=\s*(["\'])(?P<uploader_id>[^\1]+?)\1',
|
||||||
webpage, 'uploader id', fatal=False)
|
webpage, 'uploader id', fatal=False, group='uploader_id')
|
||||||
uploader = self._search_regex(
|
uploader = self._search_regex(
|
||||||
r'window\.channelName\s*=\s*"Embedded:([^"]+)"',
|
r'window\.channelName\s*=\s*(["\'])Embedded:(?P<uploader>[^\1]+?)\1',
|
||||||
webpage, 'uploader', default=False)
|
webpage, 'uploader', default=False, group='uploader')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user