fortnitepy icon indicating copy to clipboard operation
fortnitepy copied to clipboard

Improve Server Status Information

Open Luc1412 opened this issue 5 years ago • 0 comments

Maintenance Coutdown: Add the Countdown for Maintenace which can be found in the lightswitch endpoint.

countdown_to_maintenance_in_ms = response['timeToShutdownInMs']

If there is no maintenance 'timeToShutdownInMs' is not in the response included.

Details for Services: I don't know if this fit's in the API, cuz it's not directly an Endpoint from Epic, but it's possible to get the separated Service Status with 2 Methods:

Parsing the HTML File (I currently use that method):

with urllib.request.urlopen('https://status.epicgames.com/') as fp:
    html = BeautifulSoup(fp, 'html.parser')
    components_cont = html.find('div', attrs={'class': 'child-components-container'})
    components = components_cont.findAll('div', recursive=False)
    for component in components:
        name = component.find('span', attrs={'class': 'name'}).getText(strip=True).replace(' ', '').lower()
        status = component.find('span', attrs={'class': 'component-status'}).getText(strip=True).replace(' ', '').lower()
        data[name] = status

(Could be changed to async)

Get it from the json: Endpoint: https://status.epicgames.com/index.json

I'm not sure how to get the separated information. It could be only displayed if a Service is down.

Luc1412 avatar Sep 02 '19 17:09 Luc1412