Skip to content
Snippets Groups Projects

Refactor

Merged Bjarke Madsen requested to merge refactor into develop
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
@@ -46,8 +46,11 @@ def extract_urls(text: str) -> List[str]:
def valid_url(url: str) -> bool:
try:
parsed = url_parse(url)
valid = bool(parsed)
if not valid:
# if it's valid with the scheme added, then we're fine
parsed = url_parse('http://' + url)
valid = bool(parsed)
except Exception:
valid = False
return valid
Loading