question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin my_anime_list, URL JSON result maxed at 300 entries.

See original GitHub issue

Expected behaviour:

For the Plugin: my_anime_list to return the requested categories, preferably with less traffic overhead.

Actual behaviour:

The URL JSON result returns the first 300 results of ALL categories in order of status id. This is a limitation of the JSON url used and not a bug in the flexget plugin code.

Steps to reproduce:

  • Step 1: Have more than 300 listed anime on the site, in any given category.
  • Step 2: Request a category that is sorted last in the JSON result, like “plan_to_watch”.
  • Step 3: If you have more than 300 anime listed as “Completed” or “Dropped”, the JSON result would never load the “plan_to_watch” entries.

Config:

my_anime_list:
  username: <removed>
  status:
    - watching
    - plan_to_watch

Log:

(click to expand)
na

Additional information:

The JSON source used in the plugin, only gives the first 300 results from MAL. (https://myanimelist.net/animelist/flexget/load.json) This is not an issue if you use “watching” as they are sorted first in the JSON reply, but “plan_to_watch” that many use is sorted last, after categories like “completed” and “dropped”.

Solutions: It’s possible to specify what result you want in the URL but only for a single status id. If it merged multiple status specific JSON results, it would probably require less traffic than the current parameterless “load.JSON”, as most users just want status “1” & “6”. Ex. Status 6 is “plan_to_watch” only: https://myanimelist.net/animelist/flexget/load.json?status=6

It’s also possible to offset the result by a given amount, but would require merging large lists until an empty result is given “[]”. Ex. JSON results from 300->600: https://myanimelist.net/animelist/flexget/load.json?offset=300

Alternative solution: From what i read, Load.JSON is an internal tool for loading lists and is not meant to be used as an API. There is a new API, but it appears to require an authorization token to use and it’s in beta: API auth: https://myanimelist.net/apiconfig API doc.: https://myanimelist.net/apiconfig/references/api/v2

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BrutuZcommented, May 8, 2022

Good to hear it worked. The change isn’t implemented yet, it’s still an Open Pull Request. It should go live up to 24h after approval, but that can take a while, depends on the team members availability.

Easiest way to test in my opinion would’ve been navigating to the virtual-env of your install and overwriting that one file. But as you found out, there’s more than one way to peel that egg, so whichever one works for you should be fine 😝.

1reaction
BrutuZcommented, Apr 19, 2022

TBF, it’s an input, API would be overkill since we’re just reading. So much so that the plugin used to scrape the webpage before being rewritten to use the JSON 😅.

Good info with the parameters though, if there’s no PR until later in the week I might give it a go 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Any way to get the entire list JSON? - Forums - MyAnimeList.net
There's a way, but the result is XML, not JSON. ... Since your list has less than 300 entries, I provided my nickname...
Read more >
Undocumented JSON API information - Forums
Read the topic about Undocumented JSON API information on MyAnimeList, and join in the discussion on the largest online anime and manga ......
Read more >
Importing list data - Forums - MyAnimeList.net
Simply put, is there a way to import a data list generated elsewhere? I have CSV, XML and JSON files to work with....
Read more >
Swift's Alamofire patch problem - Forums - MyAnimeList.net
New to swift coding. Trying to update an anime entry but the request returns 400. let parameters = DetailsAnimeResponse.ListStatus( status: " ...
Read more >
MyAnimeList API (beta ver.) (2)
The API client can see and modify basic profile information and users' list data, post information to MyAnimelist on behalf of users.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found