@asyncio.coroutine
def get_server_online(server, tries=5):
    'Returns a list of all the online players in current server.\n\n    Each list element is a dictionary with the following keys: name, level'
    server = server.capitalize()
    url = ('https://secure.tibia.com/community/?subtopic=worlds&world=' + server)
    onlineList = []
    try:
        page = (yield from aiohttp.get(url))
        content = (yield from page.text(encoding='ISO-8859-1'))
    except Exception:
        if (tries == 0):
            log.error("getServerOnline: Couldn't fetch {0}, network error.".format(server))
            return onlineList
        else:
            tries -= 1
            (yield from asyncio.sleep(network_retry_delay))
            ret = (yield from get_server_online(server, tries))
            return ret
    while ((not content) and (tries > 0)):
        try:
            page = (yield from aiohttp.get(url))
            content = (yield from page.text(encoding='ISO-8859-1'))
        except Exception:
            tries -= 1
    try:
        start_index = content.index('<div class="BoxContent"')
        end_index = content.index('<div id="ThemeboxesColumn" >')
        content = content[start_index:end_index]
    except ValueError:
        if (tries == 0):
            log.error("getServerOnline: Couldn't fetch {0}, network error.".format(server))
            return onlineList
        else:
            tries -= 1
            (yield from asyncio.sleep(network_retry_delay))
            ret = (yield from get_server_online(server, tries))
            return ret
    regex_members = '<a href="https://secure.tibia.com/community/\\?subtopic=characters&name=(.+?)" >.+?</a></td><td style="width:10%;" >(.+?)</td>'
    pattern = re.compile(regex_members, (re.MULTILINE + re.S))
    m = re.findall(pattern, content)
    if m:
        for (name, level) in m:
            name = urllib.parse.unquote_plus(name)
            onlineList.append({'name': name, 'level': int(level)})
    return onlineList
Returns a list of all the online players in current server.

Each list element is a dictionary with the following keys: name, level
@asyncio.coroutine
def get_server_online(server, tries=5):
    'Returns a list of all the online players in current server.\n\n    Each list element is a dictionary with the following keys: name, level'
    server = server.capitalize()
    url = ('https://secure.tibia.com/community/?subtopic=worlds&world=' + server)
    onlineList = []
    try:
        page = (yield from aiohttp.get(url))
        content = (yield from page.text(encoding='ISO-8859-1'))
    except Exception:
        if (tries == 0):
            log.error("getServerOnline: Couldn't fetch {0}, network error.".format(server))
            return onlineList
        else:
            tries -= 1
            (yield from asyncio.sleep(network_retry_delay))
            ret = (yield from get_server_online(server, tries))
            return ret
    while ((not content) and (tries > 0)):
        try:
            page = (yield from aiohttp.get(url))
            content = (yield from page.text(encoding='ISO-8859-1'))
        except Exception:
            tries -= 1
    try:
        start_index = content.index('<div class="BoxContent"')
        end_index = content.index('<div id="ThemeboxesColumn" >')
        content = content[start_index:end_index]
    except ValueError:
        if (tries == 0):
            log.error("getServerOnline: Couldn't fetch {0}, network error.".format(server))
            return onlineList
        else:
            tries -= 1
            (yield from asyncio.sleep(network_retry_delay))
            ret = (yield from get_server_online(server, tries))
            return ret
    regex_members = '<a href="https://secure.tibia.com/community/\\?subtopic=characters&name=(.+?)" >.+?</a></td><td style="width:10%;" >(.+?)</td>'
    pattern = re.compile(regex_members, (re.MULTILINE + re.S))
    m = re.findall(pattern, content)
    if m:
        for (name, level) in m:
            name = urllib.parse.unquote_plus(name)
            onlineList.append({'name': name, 'level': int(level)})
    return onlineList