Skip to content

Commit

Permalink
Fix spansh url check
Browse files Browse the repository at this point in the history
  • Loading branch information
seldonlabs committed Jun 27, 2018
1 parent 866d8e0 commit de6cac5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spansh.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import os
import pyperclip
import re
import requests
import threading
import time
Expand Down Expand Up @@ -106,7 +107,8 @@ def button_callback(self):
if DEBUG:
url = "https://spansh.co.uk/api/results/zuppa"

if not url.startswith("https://spansh.co.uk/api/results/"):
# if not url.startswith("https://spansh.co.uk/api/results/"):
if not re.match(r"^https://(www\.)?spansh.co.uk/api/results/", url):
print "Wrong URL, not spansh!"
self.show_error("The URL you pasted is not a spansh.co.uk URL."
" Please copy a plot URL from https://spansh.co.uk"
Expand Down

0 comments on commit de6cac5

Please sign in to comment.