PretendoNetwork / archival-tools

A collection of tools dedicated to archiving several types of data from many Nintendo WiiU and 3DS games
40 stars 6 forks source link

spotpass: Add task finder scripts #25

Closed MisterSheeple closed 3 months ago

MisterSheeple commented 4 months ago

This is a script that automatically checks all present app IDs for a specified task name. This is useful for common names such as FGONLYT where many app IDs use it. This is essentially a mish-mash of parts of the read-boss-db-3ds and scrape-3ds scripts. It pings NPFL to check if the task exists under a certain app ID. If it's considered valid for that app ID, then it adds that task to the json. If invalid, it ignores and moves on.

TODO:

It's kinda sloppy right now, so feedback is greatly appreciated.

MisterSheeple commented 4 months ago

Do I need to input region/lang in order to determine if the task works or can I just remove that part?

jonbarrow commented 4 months ago

Do you mean in general, or the query params?

MisterSheeple commented 4 months ago

The query params. Essentially I'm wondering if some tasks specifically don't show up in certain regions/langs or if it's just the files that do that.

jonbarrow commented 4 months ago

Whether or not the query params are needed depends on 2 things:

  1. The endpoint being hit
  2. The task

Some tasks are region locked. And there's no real way to know which ones are without trying the locale combinations. Additionally some tasks seem to have a "default" response they'll use if an invalid locale is used, while some just 403. Also a task may only be language locked, but not country locked. It's super context dependant and honestly a mess

If a task is region locked, then you only need the query param(s) when using NPFL. NPDL can also be region locked, but it uses the path to determine this rather than query params and there is 4 known variations of this path format (again with no real way to know which is used besides just trying them all)

MisterSheeple commented 3 months ago

Please review and let me know if there's any issues. If not, I'll get to work on creating the Wii U equivalent.

MisterSheeple commented 3 months ago

I think it should be pretty much ready for merge now unless you have any other feedback