Spaces:
Runtime error
Runtime error
noelfranthomas
commited on
Commit
•
6efbf04
1
Parent(s):
245fecf
init3
Browse files
utils.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from urllib.parse import urlparse
|
2 |
+
|
3 |
+
# Checks if URL is valid
|
4 |
+
def isValidURL(url):
|
5 |
+
if url == "":
|
6 |
+
return False
|
7 |
+
try:
|
8 |
+
res = urlparse(url)
|
9 |
+
if res[1] == "pub-calgary.escribemeetings.com":
|
10 |
+
return True
|
11 |
+
else:
|
12 |
+
return False
|
13 |
+
except ValueError:
|
14 |
+
return False
|