import urllib.request
ip = input("Server address: ")
url = 'https://' + ip + ':1337/?action=actionNames'
print("Request progress to ", url)
res = urllib.request.urlopen(url)
text = res.read()
print(text)
b"<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /></head><body><p>50 action from 120</p></body></html>"
>>> import re
>>> res = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /></head><body><p>50 action from 120</p></body></html>"
>>> fineprint = re.search(r"(?<=</head><body><p>).+(?=</p></body></html>)", res).group()
>>> print(fineprint)
'50 action from 120'