JFryy / MAL-API-Client

An third party object oriented python client library for My Anime List's newly released official REST API
MIT License
15 stars 2 forks source link

Duplicates returned in get_seasonal_anime() and get_user_anime_list() #2

Open fushinori opened 4 years ago

fushinori commented 4 years ago

Example

print([x.title for x in client.get_seasonal_anime(2020, "fall")])

>>> ['Maesetsu!', 'Maesetsu!', 'Tsukiuta. The Animation 2', 'Tsukiuta. The Animation 2', "King's Raid: Ishi wo Tsugumono-tachi", "King's Raid: Ishi wo Tsugumono-tachi", 'Rail Romanesque', 'Rail Romanesque', 'Iwa Kakeru!: Sport Climbing Girls', 'Iwa Kakeru!: Sport Climbing Girls', 'A3! Season Autumn & Winter', 'A3! Season Autumn & Winter', 'Yuukoku no Moriarty', 'Yuukoku no Moriarty', '100-man no Inochi no Ue ni Ore wa Tatteiru', '100-man no Inochi no Ue ni Ore wa Tatteiru', 'Kimi wa Kanata', 'Kimi wa Kanata', 'Kami-tachi ni Hirowareta Otoko', 'Kami-tachi ni Hirowareta Otoko', 'Maou-jou de Oyasumi', 'Maou-jou de Oyasumi', 'Monster Strike the Movie: Lucifer - Zetsubou no Yoake', 'Monster Strike the Movie: Lucifer - Zetsubou no Yoake', 'Munou na Nana', 'Munou na Nana', 'Fushigi Dagashiya: Zenitendou', 'Fushigi Dagashiya: Zenitendou', 'Seizei Ganbare! Mahou Shoujo Kurumi 3rd Season', 'Seizei Ganbare! Mahou Shoujo Kurumi 3rd Season', 'Animation Kapibara-san', 'Animation Kapibara-san', 'Osomatsu-san 3rd Season', 'Osomatsu-san 3rd Season', 'Mo Du Zhe', 'Mo Du Zhe', 'D4DJ: First Mix', 'D4DJ: First Mix', 'Entotsu Machi no Poupelle', 'Entotsu Machi no Poupelle']

JustPieceOfMeat commented 4 years ago

I have the same problem:

animes = mal_client.search_anime(query.query, limit=10)
    for anime in animes:
        print(anime)
{'id': 40060, 'title': 'BNA', 'main_picture': {'medium': 'https://api-cdn.myanimelist.net/images/anime/1139/106986.jpg', 'large': 'https://api-cdn.myanimelist.net/images/anime/1139/106986l.jpg'}, 'alternative_titles': {'synonyms': ['Brand New Animal'], 'en': '', 'ja': 'BNA ビー・エヌ・エー'}, 'start_date': '2020-04-09', 'end_date': '2020-05-06', 'synopsis': 'Throughout history, humans have been at odds with Beastmen—a species capable of changing shape due to their genetic "Beast Factor." Because of this conflict, Beastmen have been forced into hiding. Anima City serves as a safe haven for these oppressed individuals to live free from human interference.\n\nDuring a festival celebrating the town\'s 10th anniversary, Michiru Kagemori, a human who suddenly turned into a tanuki, finds that Anima City is a far cry from paradise. After witnessing an explosion in the square, she is confronted by Shirou Ogami, a seemingly indestructible wolf and sworn protector of all Beastmen. As they pursue the criminals behind the bombing, the two discover that Michiru is anything but an ordinary Beastman, and look to investigate her mysterious past and uncanny abilities. Could she turn out to be the missing link between Humans and Beastmen?\n\n[Written by MAL Rewrite]', 'mean': 7.54, 'rank': 1442, 'popularity': 804, 'num_list_users': 162548, 'num_scoring_users': 71893, 'nsfw': 'white', 'created_at': '2019-07-05T12:43:07+00:00', 'updated_at': '2020-09-12T18:44:01+00:00', 'media_type': 'ona', 'status': 'finished_airing', 'genres': [{'id': 1, 'name': 'Action'}, {'id': 31, 'name': 'Super Power'}, {'id': 10, 'name': 'Fantasy'}], 'num_episodes': 12, 'start_season': {'year': 2020, 'season': 'spring'}, 'source': 'original', 'studios': [{'id': 803, 'name': 'Trigger'}]}
{'id': 40060, 'title': 'BNA', 'main_picture': {'medium': 'https://api-cdn.myanimelist.net/images/anime/1139/106986.jpg', 'large': 'https://api-cdn.myanimelist.net/images/anime/1139/106986l.jpg'}, 'alternative_titles': {'synonyms': ['Brand New Animal'], 'en': '', 'ja': 'BNA ビー・エヌ・エー'}, 'start_date': '2020-04-09', 'end_date': '2020-05-06', 'synopsis': 'Throughout history, humans have been at odds with Beastmen—a species capable of changing shape due to their genetic "Beast Factor." Because of this conflict, Beastmen have been forced into hiding. Anima City serves as a safe haven for these oppressed individuals to live free from human interference.\n\nDuring a festival celebrating the town\'s 10th anniversary, Michiru Kagemori, a human who suddenly turned into a tanuki, finds that Anima City is a far cry from paradise. After witnessing an explosion in the square, she is confronted by Shirou Ogami, a seemingly indestructible wolf and sworn protector of all Beastmen. As they pursue the criminals behind the bombing, the two discover that Michiru is anything but an ordinary Beastman, and look to investigate her mysterious past and uncanny abilities. Could she turn out to be the missing link between Humans and Beastmen?\n\n[Written by MAL Rewrite]', 'mean': 7.54, 'rank': 1442, 'popularity': 804, 'num_list_users': 162548, 'num_scoring_users': 71893, 'nsfw': 'white', 'created_at': '2019-07-05T12:43:07+00:00', 'updated_at': '2020-09-12T18:44:01+00:00', 'media_type': 'ona', 'status': 'finished_airing', 'genres': [{'id': 1, 'name': 'Action'}, {'id': 31, 'name': 'Super Power'}, {'id': 10, 'name': 'Fantasy'}], 'num_episodes': 12, 'start_season': {'year': 2020, 'season': 'spring'}, 'source': 'original', 'studios': [{'id': 803, 'name': 'Trigger'}]}
{'id': 22509, 'title': 'Manga Nihonshi (NHK Han)', 'main_picture': {'medium': 'https://api-cdn.myanimelist.net/images/anime/10/59271.jpg', 'large': 'https://api-cdn.myanimelist.net/images/anime/10/59271l.jpg'}, 'alternative_titles': {'synonyms': ['Manga Nihonshi NHK'], 'en': '', 'ja': 'まんが日本史[NHK版]'}, 'start_date': '1992-04-06', 'end_date': '1993-03-08', 'synopsis': '', 'mean': 6.96, 'rank': 14976, 'popularity': 12527, 'num_list_users': 352, 'num_scoring_users': 60, 'nsfw': 'white', 'created_at': '2014-02-04T15:21:48+00:00', 'updated_at': '2020-07-22T21:15:48+00:00', 'media_type': 'tv', 'status': 'finished_airing', 'genres': [{'id': 13, 'name': 'Historical'}], 'num_episodes': 40, 'start_season': {'year': 1992, 'season': 'spring'}, 'studios': []}
{'id': 22509, 'title': 'Manga Nihonshi (NHK Han)', 'main_picture': {'medium': 'https://api-cdn.myanimelist.net/images/anime/10/59271.jpg', 'large': 'https://api-cdn.myanimelist.net/images/anime/10/59271l.jpg'}, 'alternative_titles': {'synonyms': ['Manga Nihonshi NHK'], 'en': '', 'ja': 'まんが日本史[NHK版]'}, 'start_date': '1992-04-06', 'end_date': '1993-03-08', 'synopsis': '', 'mean': 6.96, 'rank': 14976, 'popularity': 12527, 'num_list_users': 352, 'num_scoring_users': 60, 'nsfw': 'white', 'created_at': '2014-02-04T15:21:48+00:00', 'updated_at': '2020-07-22T21:15:48+00:00', 'media_type': 'tv', 'status': 'finished_airing', 'genres': [{'id': 13, 'name': 'Historical'}], 'num_episodes': 40, 'start_season': {'year': 1992, 'season': 'spring'}, 'studios': []}
{'id': 37916, 'title': 'Uma Musume: Pretty Derby - BNW no Chikai', 'main_picture': {'medium': 'https://api-cdn.myanimelist.net/images/anime/1733/93479.jpg', 'large': 'https://api-cdn.myanimelist.net/images/anime/1733/93479l.jpg'}, 'alternative_titles': {'synonyms': ['Uma Musume: Pretty Derby Specials'], 'en': '', 'ja': 'ウマ娘 プリティーダービー BNWの誓い'}, 'start_date': '2018-12-19', 'end_date': '2018-12-19', 'synopsis': 'Special episodes included with the fourth volume of Uma Musume: Pretty Derby Blu-ray release.', 'mean': 7.01, 'rank': 3530, 'popularity': 5433, 'num_list_users': 6917, 'num_scoring_users': 1507, 'nsfw': 'white', 'created_at': '2018-05-21T09:34:49+00:00', 'updated_at': '2020-08-06T03:26:58+00:00', 'media_type': 'special', 'status': 'finished_airing', 'genres': [{'id': 36, 'name': 'Slice of Life'}, {'id': 30, 'name': 'Sports'}], 'num_episodes': 3, 'start_season': {'year': 2018, 'season': 'fall'}, 'source': 'game', 'studios': [{'id': 132, 'name': 'P.A. Works'}]}
{'id': 37916, 'title': 'Uma Musume: Pretty Derby - BNW no Chikai', 'main_picture': {'medium': 'https://api-cdn.myanimelist.net/images/anime/1733/93479.jpg', 'large': 'https://api-cdn.myanimelist.net/images/anime/1733/93479l.jpg'}, 'alternative_titles': {'synonyms': ['Uma Musume: Pretty Derby Specials'], 'en': '', 'ja': 'ウマ娘 プリティーダービー BNWの誓い'}, 'start_date': '2018-12-19', 'end_date': '2018-12-19', 'synopsis': 'Special episodes included with the fourth volume of Uma Musume: Pretty Derby Blu-ray release.', 'mean': 7.01, 'rank': 3530, 'popularity': 5433, 'num_list_users': 6917, 'num_scoring_users': 1507, 'nsfw': 'white', 'created_at': '2018-05-21T09:34:49+00:00', 'updated_at': '2020-08-06T03:26:58+00:00', 'media_type': 'special', 'status': 'finished_airing', 'genres': [{'id': 36, 'name': 'Slice of Life'}, {'id': 30, 'name': 'Sports'}], 'num_episodes': 3, 'start_season': {'year': 2018, 'season': 'fall'}, 'source': 'game', 'studios': [{'id': 132, 'name': 'P.A. Works'}]}