aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts/check-porn.py
diff options
context:
space:
mode:
Diffstat (limited to 'devscripts/check-porn.py')
-rw-r--r--devscripts/check-porn.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/devscripts/check-porn.py b/devscripts/check-porn.py
index 08f663e4b..fc72c3051 100644
--- a/devscripts/check-porn.py
+++ b/devscripts/check-porn.py
@@ -13,9 +13,11 @@ import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from test.helper import gettestcases
-from yt_dlp.utils import compat_urllib_parse_urlparse, compat_urllib_request
+import urllib.parse
+import urllib.request
+
+from test.helper import gettestcases
if len(sys.argv) > 1:
METHOD = 'LIST'
@@ -26,7 +28,7 @@ else:
for test in gettestcases():
if METHOD == 'EURISTIC':
try:
- webpage = compat_urllib_request.urlopen(test['url'], timeout=10).read()
+ webpage = urllib.request.urlopen(test['url'], timeout=10).read()
except Exception:
print('\nFail: {}'.format(test['name']))
continue
@@ -36,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