howlongtobeatpy/howlongtobeatpy/HTMLRequests.py
async def async_get_game_title(game_id: int):
        """
        Function that gets the title of a game from the game (howlongtobeat) id
        @param game_id: id of the game to get the title
        @return: The game title from the given id
        """

        ua = UserAgent()
        headers = {
            'User-Agent': ua.random
        }

        url_get = HTMLRequests.GAME_URL + str(game_id)

        # Request and extract title
        async with aiohttp.ClientSession() as session:
            async with session.post(url_get, headers=headers) as resp:
                if resp is not None and str(resp.status) == "200":
                    text = await resp.text()
                    return HTMLRequests.__cut_game_title(text)
                else:
                    return None

        Function that gets the title of a game from the game (howlongtobeat) id
        @param game_id: id of the game to get the title
        @return: The game title from the given id
        
Function that gets the title of a game from the game (howlongtobeat) id
Function that gets the title of a game from the game ( howlongtobeat ) id
async def async_get_game_title(game_id: int):
        ua = UserAgent()
        headers = {
            'User-Agent': ua.random
        }
        url_get = HTMLRequests.GAME_URL + str(game_id)
        async with aiohttp.ClientSession() as session:
            async with session.post(url_get, headers=headers) as resp:
                if resp is not None and str(resp.status) == "200":
                    text = await resp.text()
                    return HTMLRequests.__cut_game_title(text)
                else:
                    return None
async def async_get_game_title ( game_id : int ) : ua = UserAgent ( ) headers = { 'User-Agent' : ua . random } url_get = HTMLRequests . GAME_URL + str ( game_id ) async with aiohttp . ClientSession ( ) as session : async with session . post ( url_get , headers = headers ) as resp : if resp is not None and str ( resp . status ) == "200" : text = await resp . text ( ) return HTMLRequests . __cut_game_title ( text ) else : return None
Function that gets the title of a game from the game (howlongtobeat) id
Function that gets the title of a game from the game ( howlongtobeat ) id
"""
        Function that gets the title of a game from the game (howlongtobeat) id
        @param game_id: id of the game to get the title
        @return: The game title from the given id
        """ # Request and extract title
The game title from the given id
The game title from the given id
game_id
int
id of the game to get the title
id of the game to get the title