Added README
This commit is contained in:
6
main.py
6
main.py
@@ -159,6 +159,12 @@ def conn_type_parse():
|
||||
return conn_port
|
||||
|
||||
def check_connection_succ(text):
|
||||
"""
|
||||
Exits program if any HTTP responce code other than 200 is met
|
||||
:param str: full HTTP responce
|
||||
"""
|
||||
# If the website is using HTTP/2 and has no HTTP/1.1 options
|
||||
# you will receive an error here since it returns a 301 code
|
||||
if text.split("\n")[0].find("200") == -1:
|
||||
print("Error on HTTP request")
|
||||
print("HTTP Return Code: %s" % text.split("\n")[0])
|
||||
|
||||
Reference in New Issue
Block a user