aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index a347a50bc..6e0c31c01 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -2405,7 +2405,11 @@ def remove_quotes(s):
def get_domain(url):
- return '.'.join(urllib.parse.urlparse(url).netloc.rsplit('.', 2)[-2:])
+ """
+ This implementation is inconsistent, but is kept for compatibility.
+ Use this only for "webpage_url_domain"
+ """
+ return remove_start(urllib.parse.urlparse(url).netloc, 'www.') or None
def url_basename(url):