mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
test
This commit is contained in:
parent
26719216ca
commit
6482487f9d
@ -13,7 +13,7 @@ import requests
|
||||
import bleach
|
||||
from lxml import etree
|
||||
|
||||
api_url = 'https://httpstatuses.com/%s'
|
||||
api_url = 'https://httpstatuses.com/'
|
||||
|
||||
|
||||
@SpiceBot.prerun('module')
|
||||
@ -32,7 +32,7 @@ def fetch_result(query):
|
||||
|
||||
if not re.match('^[1-5]\d{2}$', query):
|
||||
return "Invalid HTTP status code: %s" % query
|
||||
url = api_url % query
|
||||
url = api_url + query
|
||||
try:
|
||||
r = requests.get(url=url, timeout=(10.0, 4.0))
|
||||
except requests.exceptions.ConnectTimeout:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user