Fixes: https://github.com/ytdl-org/youtube-dl/issues/28346
class TrovoBaseIE(InfoExtractor):
_VALID_URL_BASE = r'https?://(?:www\.)?trovo\.live/'
class TrovoBaseIE(InfoExtractor):
_VALID_URL_BASE = r'https?://(?:www\.)?trovo\.live/'
+ _HEADERS = {'Origin': 'https://trovo.live'}
def _extract_streamer_info(self, data):
streamer_info = data.get('streamerInfo') or {}
def _extract_streamer_info(self, data):
streamer_info = data.get('streamerInfo') or {}
'format_id': format_id,
'height': int_or_none(format_id[:-1]) if format_id else None,
'url': play_url,
'format_id': format_id,
'height': int_or_none(format_id[:-1]) if format_id else None,
'url': play_url,
+ 'http_headers': self._HEADERS,
})
self._sort_formats(formats)
})
self._sort_formats(formats)
'protocol': 'm3u8_native',
'tbr': int_or_none(play_info.get('bitrate')),
'url': play_url,
'protocol': 'm3u8_native',
'tbr': int_or_none(play_info.get('bitrate')),
'url': play_url,
+ 'http_headers': self._HEADERS,
})
self._sort_formats(formats)
})
self._sort_formats(formats)