Update regex import

This commit is contained in:
ajaymittur28 2020-07-01 15:53:29 +05:30
parent 006a945214
commit 065b9b1170
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import re
from time import time
from urllib.parse import urlparse, urlunparse, urldefrag
from re import match
from twisted.web.client import HTTPClientFactory
from twisted.web.http import HTTPClient
@ -33,7 +33,7 @@ def _parse(url):
and is ascii-only.
"""
url = url.strip()
if not match(r'^\w+://', url):
if not re.match(r'^\w+://', url):
url = '//' + url
parsed = urlparse(url)
return _parsed_url_args(parsed)