howlongtobeatpy/howlongtobeatpy/HowLongToBeat.py
async def async_search_from_id(self, game_id: int):
        """
        Function that search the game using an async request
        To re-use code, i extract the game name and search game by name, picking only the game with the same id
        Otherwise a new parser is necessary, and is probably not worth to maintain 2 different html parsers
        Remember that this function use 2 requests: one to get the game title and one to get game data
        @param game_id: The game id to get data
        @return: The game data (single HowLongToBeatEntry object) or None in case of error
        """
        if game_id is None or game_id == 0:
            return None
        game_title = await HTMLRequests.async_get_game_title(game_id)
        if game_title is not None:
            html_result = await HTMLRequests.send_async_web_request(game_title)
            if html_result is not None:
                result_list = self.__parse_web_result(game_title, html_result, game_id)
                if result_list is None or len(result_list) == 0 or len(result_list) > 1:
                    return None
                else:
                    return result_list[0]
            else:
                return None
        else:
            return None

        Function that search the game using an async request
        To re-use code, i extract the game name and search game by name, picking only the game with the same id
        Otherwise a new parser is necessary, and is probably not worth to maintain 2 different html parsers
        Remember that this function use 2 requests: one to get the game title and one to get game data
        @param game_id: The game id to get data
        @return: The game data (single HowLongToBeatEntry object) or None in case of error
        
Function that search the game using an async request
To re-use code, i extract the game name and search game by name, picking only the game with the same id
Otherwise a new parser is necessary, and is probably not worth to maintain 2 different html parsers
Remember that this function use 2 requests: one to get the game title and one to get game data
Function that search the game using an async request To re - use code i extract the game name and search game by name picking only the game with the same id Otherwise a new parser is necessary and is probably not worth to maintain 2 different html parsers Remember that this function use 2 requests : one to get the game title and one to get game data
async def async_search_from_id(self, game_id: int):
        if game_id is None or game_id == 0:
            return None
        game_title = await HTMLRequests.async_get_game_title(game_id)
        if game_title is not None:
            html_result = await HTMLRequests.send_async_web_request(game_title)
            if html_result is not None:
                result_list = self.__parse_web_result(game_title, html_result, game_id)
                if result_list is None or len(result_list) == 0 or len(result_list) > 1:
                    return None
                else:
                    return result_list[0]
            else:
                return None
        else:
            return None
async def async_search_from_id ( self , game_id : int ) : if game_id is None or game_id == 0 : return None game_title = await HTMLRequests . async_get_game_title ( game_id ) if game_title is not None : html_result = await HTMLRequests . send_async_web_request ( game_title ) if html_result is not None : result_list = self . __parse_web_result ( game_title , html_result , game_id ) if result_list is None or len ( result_list ) == 0 or len ( result_list ) > 1 : return None else : return result_list [ 0 ] else : return None else : return None
Function that search the game using an async request
To re-use code, i extract the game name and search game by name, picking only the game with the same id
Otherwise a new parser is necessary, and is probably not worth to maintain 2 different html parsers
Remember that this function use 2 requests: one to get the game title and one to get game data
Function that search the game using an async request To re - use code i extract the game name and search game by name picking only the game with the same id Otherwise a new parser is necessary and is probably not worth to maintain 2 different html parsers Remember that this function use 2 requests : one to get the game title and one to get game data
"""
        Function that search the game using an async request
        To re-use code, i extract the game name and search game by name, picking only the game with the same id
        Otherwise a new parser is necessary, and is probably not worth to maintain 2 different html parsers
        Remember that this function use 2 requests: one to get the game title and one to get game data
        @param game_id: The game id to get data
        @return: The game data (single HowLongToBeatEntry object) or None in case of error
        """
The game data (single HowLongToBeatEntry object) or None in case of error
The game data ( single HowLongToBeatEntry object ) or None in case of error
self
game_id
int
The game id to get data
The game id to get data