Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Server Status Information #27

Open
Luc1412 opened this issue Sep 2, 2019 · 0 comments
Open

Improve Server Status Information #27

Luc1412 opened this issue Sep 2, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@Luc1412
Copy link
Contributor

Luc1412 commented Sep 2, 2019

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 Luc1412 changed the title Add Maintenance Countdown to Lightswitch Improve Server Status Information Sep 2, 2019
@Terbau Terbau added the enhancement New feature or request label Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants