mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-15 00:48:28 +00:00
Use hostname
This commit is contained in:
parent
64cf8a75d4
commit
c7153f95be
@ -182,13 +182,12 @@ def _real_extract(self, url):
|
||||
for embedded_video in embedded_videos:
|
||||
video_data = extract_attributes(embedded_video)
|
||||
url = video_data.get('src') or ''
|
||||
if url:
|
||||
url = parse.urlparse(url).hostname
|
||||
if url == 'www.youtube.com':
|
||||
hostname = parse.urlparse(url).hostname
|
||||
if hostname == 'www.youtube.com':
|
||||
entries.append(self.url_result(url, ie='Youtube'))
|
||||
elif url == 'www.redditmedia.com':
|
||||
elif hostname == 'www.redditmedia.com':
|
||||
entries.append(self.url_result(url, ie='Reddit'))
|
||||
elif url == 'www.facebook.com' and 'plugins/video' in url:
|
||||
elif hostname == 'www.facebook.com' and 'plugins/video' in url:
|
||||
entries.append(self.url_result(url, ie='FacebookPluginsVideo'))
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user