Reviews Parsing Incorrectly.

Issue #68 resolved
Andy Ibanez created an issue

It looks like the API is having troubles parsing reviews. Particularly, it is not correctly fetching the number of episodes a reviewer has watched and the total amount of episodes in a series.

Let's use one of my favorites as an example:

http://myanimelist.net/anime/232/Cardcaptor_Sakura

If you look at the first review there (posted by the user Veronin), you'll see that he has watched 70 episodes out of 70 episodes in the series.

But if you look at the response when calling api.atarashiiapp.com/2/anime/reviews/232, its result is wrong. I'm attaching an screenshot of this.

According to the API, Veronin watched 0 episodes out of 9. A quick look at the whole JSON response seems to imply that all reviews have watched_episodes with the value 0, and the episodes and ratings seem to be equal.

I'd also like to mention that it is seemingly putting random HTML into the review content, along with raw line breaks (\r\n) (this happens with series synopsis, and while the API claims that series synopsis do contain HTML, the HTML is only at the end and it's only an open h2 tag). This can probably be fixed with a simple regex to strip out the HTML.

Comments (5)

  1. Andy Ibanez reporter

    I'd like to point something else out. My wrapper's unit tests caught that there's some reviews that don't have an "episodes" JSON key. If you view the reviews from my link above (the ones for Card Captor Sakura) and scroll down to Riina's review, you will see that her review doesn't have the "70 of 70 episodes seen" text that all other reviews do. The "70" in Riina's review is the total of episodes in the anime, not the episodes she watched herself.

    This is a slightly pedantic detail (so my apologies, but should be fixed anyway), but the API returns that 70 as "watched_episodes" instead of "episodes". I think this is wrong because if a user doesn't choose the amount of episodes watched, we can't know for sure how many episodes they really watched. On the other hand, this anime will always have 70 episodes, so we can assume the missing data is the episodes she watched, not the total episodes of an anime. That 70 in the API should be returned in the "episodes" JSON key instead of "watched_episodes".

    TLDR: All reviews in which the user didn't fill in the "episodes watched" part, should return the total amount of episodes in "episodes" instead of "watched_episodes".

  2. Andy Ibanez reporter

    I also forgot to say, the API is now correctly returning the number of episodes instead of duplicating the user score. Thanks for fixing this!

  3. Log in to comment