diff --git a/parser.py b/parser.py index fc08caf..5a241d2 100644 --- a/parser.py +++ b/parser.py @@ -16,7 +16,7 @@ class parser: def parse_url(self, url): # Take in a URL and output a dict of the url parts - regex = r'^(?P(?:gopher:\/\/)?)?(?P[\w\.\d]+)(?P(?::\d+)?)?(?P(?:\/[\dgIp])?)?(?P(?:\/[\w\/\d\-?.]*)?)?$' + regex = r'^(?P(?:(gopher|http):\/\/)?)?(?P[\w\.\d]+)(?P(?::\d+)?)?(?P(?:\/[\dgIp])?)?(?P(?:\/\S*)?)?$' match = re.match(regex, url) protocol = match.group('protocol')