1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-07-01 11:32:52 -05:00

[compat] Remove deprecated functions from core code

This commit is contained in:
pukkandan
2022-06-24 16:24:43 +05:30
parent 54007a45f1
commit 14f25df2b6
30 changed files with 203 additions and 245 deletions

View File

@ -14,10 +14,10 @@ import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import urllib.parse
import urllib.request
from test.helper import gettestcases
from yt_dlp.utils import compat_urllib_parse_urlparse
if len(sys.argv) > 1:
METHOD = 'LIST'
@ -38,7 +38,7 @@ for test in gettestcases():
RESULT = 'porn' in webpage.lower()
elif METHOD == 'LIST':
domain = compat_urllib_parse_urlparse(test['url']).netloc
domain = urllib.parse.urlparse(test['url']).netloc
if not domain:
print('\nFail: {}'.format(test['name']))
continue