Jan-18-2018, 05:13 PM
Here a tips after taking a quick look at site.
Server status one image(icon) that push up and down based on server status.
Server-up has
Example first server.
Server status one image(icon) that push up and down based on server status.
Server-up has
'data-value': '1'
server-down 'data-value': '8'
.Example first server.
from bs4 import BeautifulSoup import requests url = 'http://tera.enmasse.com/server-status' url_get = requests.get(url) soup = BeautifulSoup(url_get.content, 'lxml') first = soup.select('.server-status-icon')Test:
>>> first[0].attrs {'class': ['server-status-icon'], 'data-value': '8'} >>> first[0].attrs['data-value'] '8'