mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-15 03:41:33 +01:00
use urllib.parse.urlparse()
This commit is contained in:
parent
60f51dec60
commit
fe29c67a14
1 changed files with 1 additions and 1 deletions
|
@ -1013,7 +1013,7 @@ class NiconicoLiveIE(InfoExtractor):
|
|||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage, urlh = self._download_webpage_handle(f'https://live.nicovideo.jp/watch/{video_id}', video_id)
|
||||
headers = {'Origin': 'https://' + remove_start(urlparse(urlh.url).hostname, 'sp.')}
|
||||
headers = {'Origin': 'https://' + remove_start(urllib.parse.urlparse(urlh.url).hostname, 'sp.')}
|
||||
|
||||
embedded_data = self._parse_json(unescapeHTML(self._search_regex(
|
||||
r'<script\s+id="embedded-data"\s*data-props="(.+?)"', webpage, 'embedded data')), video_id)
|
||||
|
|
Loading…
Reference in a new issue