Code Monkey home page Code Monkey logo

splatnet2statink's People

Contributors

1404er avatar clovervidia avatar fetus-hina avatar frozenpandaman avatar iceflinger avatar jetsurf avatar k-ashiya avatar kamiyaowl avatar martinemde avatar mathewthe2 avatar mkody avatar niyari avatar nu50218 avatar okahashi117 avatar rinsuki avatar royxiang avatar tiryoh avatar tkgstrator avatar victrid avatar wkoichi avatar ydkk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

splatnet2statink's Issues

fails to set session_token and cookie at the same time when running in monitoring mode

Splatfest only starts in 2 hours for me, weird that it passed mode == 'fest'

Traceback (most recent call last):
  File "splatnet2statink.py", line 685, in <module>
    post_battle(i, results, is_s, is_t, is_m, debug)
  File "splatnet2statink.py", line 560, in post_battle
    title_before = results[i]["player_result"]["player"]["fes_grade"]["rank"]
KeyError: 'fes_grade'

splatnet2statink v1.5.3's cookie regeneration returns an upgrade error

It seems Nintendo has updated their app again (iirc in time for Animal Crossing: New Horizon's new features) - trying to regenerate the stored cookie returns:

splatnet2statink v1.5.3
The stored cookie has expired.
Attempting to generate new cookie...
Error from Nintendo (in Account/Login step):
{
  "errorMessage": "Upgrade required.",
  "status": 9427,
  "correlationId": "REDACTED"
}

Can't rename proxy in iOS

Stuck on step 7 for iOS. It tells me to rename the proxy profile, but there is no option to rename it anywhere.

Nintendo Switch Online app just keeps saying the connection is unstable.

f token generation in NSO app v1.4.1

(Migrating from #56 where the discussion got a bit messy and where we were still figuring out specifics of the situation.)

The f token was introduced into the Nintendo Switch Online app last year in v1.1.0 as a parameter that must be sent in the request to Nintendo to generate an iksm_session cookie, which grants access to app.splatoon2.nintendo.net and thus a user's battle log. We were able to figure out the generation method and create an API to return the f value for a given input.

In v1.4.1 of the app, f is generated in a new, as-of-yet unknown way. Tokens appear to be in a slightly different form, and requests sent with the old-style f tokens now return an "Invalid token." response. Users may still use mitmproxy to obtain iksm_session cookies manually via sniffing app traffic, but this is not a solution or ideal experience.

If you can help with reverse engineering the app and figuring out how f tokens are generated, please reach out via Twitter.

This issue will stay open until f generation is once again solved or deemed practically impossible/unfeasible.

Error from flapg API

image

splatnet2statink v1.5.4
Pulling data from online...
The stored cookie has expired.
Attempting to generate new cookie...
Error from the flapg API: Error 404 (offline or incorrect headers).

mitmproxy not working

I'm trying to get an iksm_token using this guide, but it doesn't seem to work.

I've started mitmweb and changed the Wifi settings on my iOS, then I tried to get to http://mitm.it/ but after a while it says that the server doesn't respond. What did I do wrong?

W1/W2 Failure does not include wave_details

I tested a new experimental brunch, salmon-run.
I found salmon_post_shift failed if W1/W2 failure has included in results.

Traceback (most recent call last):
File "splatnet2statink.py", line 1259, in
salmonrun.upload_salmon_run(A_VERSION, YOUR_COOKIE, API_KEY, app_head)
File "salmonrun.py", line 202, in upload_salmon_run
salmon_post_shift(i, results)
File "salmonrun.py", line 104, in salmon_post_shift
payload[wave_str]["water_level"] = results[i]["wave_details"][wave]["water_level"]["key"] # low, normal, high
IndexError: list index out of range

I know it can fix by checking results[i]["wave_details"][wave] is available,
but I don't know how the data should process.

I'm so excited to collect data!

f token no longer needed?

Hello,

I've been working on a discord bot to pull data from splatnet and came across the following realization. While adapting the code from your projects token grabber to my bots code, I came across an "error". I wasn't leveraging the flapg api, but was still getting back 200OK responses from Nintendo when getting the iksm_session token. At first, I was just thinking I implemented everything correctly, but digging deeper, I found out I wasn't setting this f token up properly. I even went as far as sending "None" as a token to Nintendo AND STILL got back 200 OK responses from them with valid iksm_session tokens. I've gotten tokens for 7 discord members multiple times so far following this method.

Here is a link to the file with my version of the code: https://github.com/Jetsurf/jet-bot/blob/master/nsotoken.py

(Specifically line 128, I can put in debug prints for the entire chain into my bot and give you proof of the behavior I'm claiming)

Wasn't sure if this was the right place to post this, but I wanted to see if any of you have noticed the same thing going on? Really bizarre and might make things easier for your project.

"Invalid token." error from Nintendo

I can't use the script anymore and get this error:

Wrote session_token to config.txt.
Error from Nintendo:
{
  "status": 9403,
  "errorMessage": "Invalid token.",
  "correlationId": "9a1ee46a-d7e527d1"
}

I tried to delete my config.txt and re-login, tried to logout from the browser then login first on mobile and then again from the browser, still getting this error.

Battle count is not working correctly

All battle results are numbered 1 when I run the script with option -r.
Perhaps something wrong with splatnet2statink or stat.ink?

I can check the battle results on stat.ink correctly, so there are no problem for uploading.
Only the number of the battles seems to be not correct.

$ ./splatnet2statink.py -M 1200 -r
splatnet2statink v0.0.53
Checking if there are previously-unuploaded battles...
Previously-unuploaded battles detected. Uploading now...
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136566
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136567
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136568
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136570
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136571
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136572
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136573
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136574
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136575
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136576
Battle #1 uploaded to https://stat.ink/@tiryoh/spl2/136577
Waiting for new battles... (checking every 20 minutes)

ascii decode issue

Trying to upload battles using the -r parm and I get thrown this error

Vincents-MacBook-Pro:splatnet2statink vlee489$ python2 splatnet2statink.py -r
splatnet2statink v1.5.0
Checking if there are previously-unuploaded battles...
Previously-unuploaded battles detected. Uploading now...
Traceback (most recent call last):
  File "splatnet2statink.py", line 1271, in <module>
    populate_battles(is_s, is_t, is_r, debug)
  File "splatnet2statink.py", line 371, in populate_battles
    post_battle(0, [result], s_flag, t_flag, -1, True if i == 0 else False, debug, False)
  File "splatnet2statink.py", line 776, in post_battle
    payload["uuid"] = str(uuid.uuid5(namespace, name))
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/uuid.py", line 603, in uuid5
    hash = sha1(namespace.bytes + name).digest()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 1: ordinal not in range(128)

multiple config files with -f argument

Hi @frozenpandaman & @clovervidia,

First off, I love what you've done with the script. I took a few months off from playing, then setup the script from scratch to see how it has progressed. Nice work.

I'm finding that I have a problem running the script for multiple different people. I'd love to be able to generate a unique config.txt for each person (my wife and I).

I imagine you could move the config file loading to come after the option parser, then if you get -f [config_file_path] then you'd use that file instead of the default. Previously I added ENV loading to do this and I would put the keys in a shell script to run for each of us, but I haven't updated my branch yet. Maybe one of these options would be easy for you to incorporate into the script?

Thanks again for everything!
Martin

Python 2/3 compatibility

(See #28, #29 for some previous discussion.)

Let's work to support Python 3.x too, while not leaving 2.7.x users behind. This is important as Python 2.7 comes preinstalled on macOS and we want to make it easy for these users to run the script, even if they don't feel comfortable upgrading or working on the command line.

I've created the python3 branch. The conversion was done via futurize – which helps make projects support both Python 2 and 3 concurrently – with manual review + touchups afterward. I've done some testing and everything still seems to work (e.g. no random syntax errors). 95% of the changes were just changing raw_input() to input(), xrange() to range(), and making print() a function rather than a statement, i.e. adding parens…

This adds a single dependency which can be installed via pip install future. Note the updated README (particularly steps 1–2 of the Setup section) as well. The diff isn't that big, so check it out here: master...python3

@clovervidia (or others who watch this repo 👀), thoughts or suggestions or fixes before merging this into master?

UnboundLocalError: local variable 'acc_name' referenced before assignment

In v1.4.0, after manually entering an iksm_session cookie, I get an error:

Traceback (most recent call last):
  File "./splatnet2statink.py", line 1255, in <module>
    monitor_battles(is_s, is_t, is_r, m_value, debug)
  File "./splatnet2statink.py", line 367, in monitor_battles
    results = load_results("monitor") # make sure we can do it first. if error, throw it before main process
  File "./splatnet2statink.py", line 322, in load_results
    gen_new_cookie(reason)
  File "./splatnet2statink.py", line 138, in gen_new_cookie
    print("Wrote iksm_session cookie for {} to config.txt.".format(acc_name))
UnboundLocalError: local variable 'acc_name' referenced before assignment

Looks like acc_name is only defined if manual is false, because it's the name of the Nintendo account used for automatic cookie generation.

Despite the error, the config file is updated properly and the program works the next time I run it.

Thanks!

Can't seem to get iksm_session token from SplatNet 2

Hi, I'm trying to following the instructions here for obtaining my iksm_token and after entering my computer's IPv4 and the port as mentioned in Step 4, upon going to Step 5, my phone (iPhone SE, iOS 10.3.2) doesn't load http://mitm.it nor does it load the SplatNet 2 app. Safari tells me "Safari could not open the page because the server stopped responding" or that it's not running through the proxy and SplatNet 2 gives me a connection error, error code 2816-0599, "Internet connection is unstable". Am I missing an obvious step? Please and thank you for your help!

EDIT: I've fixed the Safari issue (I didn't have mitmweb running whoops) but SplatNet 2 either continues to give me the connection error or doesn't load anything after I click on Splatoon 2. Basically I can't get the little window to pop up that contains the iksm_session token.

f token generation changed in NSO app v1.5.0

Hello again guys.

I noticed an update hit for the NSO app. Looks like f token generation changed completely. The new tokens appear to be longer than in 1.4.1.

1.5.0.1 token
"f": "53ac761c0b943a2053bd434bbcb85b62c43165b89ce63f8bd65d1becb852bbccdcf3caaf3bbddd6b97"

As compared to 1.4.1
'f': '28b3aa6dd762fbfcf114a348d8da17fb382c4b8e'

Just giving a heads up as I won't have time in the near future to look into this; but, this appears to be the reason that they weren't doing the f token checks that I originally reported.

Splatfest experience calculation error

Hi there,

It looks like there might be an issue with the calculation of Splatfest experience. I got this error from stat.ink:

Error uploading battle. Message from server:
{
    "error": {
        "fest_exp": [
            "Fest Exp must be no less than 0."
        ]
    }
}

Getting some debug output, it’s from a battle with this JSON representation:
https://gist.github.com/ticky/4979cdd367364e5e66ff7e71307a7e0f#file-fes-1529812235-from-nintendo-json. I’ve also attached the JSON splatnet2statink attempted to upload:
https://gist.github.com/ticky/4979cdd367364e5e66ff7e71307a7e0f#file-fes-1529812235-uploaded-json

Which is producing a fest_exp output of -1, as of revision d236adc (current master), when it should be 0.

KeyError: 'rank'

After updating to v1.1.0, I ran into this error running splatnet2statink:

image

I haven't had a chance to debug this, but I think this may be related to Rank X. (I am currently not Rank X in any mode.)

I am running Python 2.7.14 on a mostly vanilla install of Ubuntu 16.04.1 LTS (via SSH), if that helps.

Tabs => Spaces?

My editor is rather annoying about this W191 Indentation contais tabs, highlighting every line and tab in the whole file and refusing to indent with tabs as I work.

I realize tab/space is practically a religious war, and I'm suggesting only at gives-a-shit-level of 1 out of 10.

I can shut off vim's syntax checking and fix my tab highlighting, but if you're open to it, it's something that a quick regex would fix.

Please close immediately if it's not worth doing.

when uploading duplicate, don't redirect and check for 302 response

currently prints out duplicate battle URL in conditional (post -> if get an error accessing location header -> if 200 response = can access URL, we've been redirected to the right one / else 4xx generic error)

if postbattle.status_code == 200: # gives OK response even though duplicate & not uploaded again

instead, don't redirect (requests.post('URL', allow_redirects=False)) and check for response code outside of try/catch -> continue and give appropriate url via location header (redirect-to-existing or newly-created upload)

Unexpected "Too many requests" error using v1.5.3

I repeatedly get a "Too many requests" error when running splatnet2statink.py, even despite waiting hours between attempts. I'm running v1.5.3, and I've historically had no issues running this version. I first noticed the issue about three or so days ago. I run on Windows 10.

Command executed:

./splatnet2statink.py

Output:

Pulling data from online...
The stored cookie has expired.
Attempting to generate new cookie...
Error from the splatnet2statink API:
{
  "error": "Too many requests"
}

battle count is sometimes wrong

Checking to see if there are unuploaded battles before exiting...
No remaining battles found.
4 wins and 1 loss this session.
4 wins and 1 loss against the other Splatfest team.
2 mirror matches against your Splatfest team.
Bye!
Checking to see if there are unuploaded battles before exiting...
No remaining battles found.
4 wins and 0 losses this session.
4 wins and 0 losses against the other Splatfest team.
1 mirror match against your Splatfest team.
Bye!

KeyError: 5015

I just got the key error after a battle. From the Ninty app and by looking at my json, the weapon with id 5015 is... Hero Dualie Replicas (heromaneuver_replica from stat.ink), which looks already listed with id 5040.
So, what is 5040?

Traceback (most recent call last):
  File "splatnet2statink.py", line 271, in <module>
    ally_stats.append(translate_weapons[int(battledata["my_team_members"][n]["player"]["weapon"]["id"])])
KeyError: 5015

Here's the value of battledata: https://gist.githubusercontent.com/mkody/d27602076b430e40ada6f34c8bfea154/raw/366343c2e179a481b5f1574a7f91441ed6c17f0f/lint-battledata.json

Cannot open NSO app using mitmproxy

With the latest version, NSO now only supports Android 5.0 and above, meaning I had to install Android 5.0 in Nox. However, I cannot get it to connect to the internet through mitmproxy anymore, despite me putting the right address as a proxy. Any ideas on how to solve this?

Uploading previously un-uploaded battles sometimes uploads very old battles

I have now seen this problem.

When I ran this script with only -r, it started uploading battles that were beyond the last 50 according to Stat.ink at the time. It seems like I had some duplicates that leaked into stat.ink at first, which broke the 50 offset from stat.ink, causing the oldest battles to be duplicated at the top.

I'm not sure what started this offset initially. Something caused a duplicate battle. Since the maximum from Stat.ink is 50 battles, we can never recover once there are recent duplicates.

This could also be solvable from Stat.ink, which could enforce uniqueness on player and battle ID. Has this been discussed? CC @fetus-hina

Edit: I updated this a bunch given new info I found. It seems clear that SplatNet is not sending back more than 50, but that Stat.ink ends up with a bad offset that can't easily be reconciled until that duplicate battles are deleted.

"pip install pillow" is required even without "-s" option

I got an error like this on version abc070e.

$ ./splatnet2statink.py -r -M 1200
Traceback (most recent call last):
  File "./splatnet2statink.py", line 11, in <module>
    from PIL import Image, ImageDraw
ImportError: No module named PIL

pip install pillow solved this problem, so I assume that pip install pillow is required.

Failure to handle (null rank) in private match

Since I have never played "ガチアサリ" , my udemae is null rank.
Then I played "ガチアサリ" in Private match, splatnet2statink.py failed to handle it.

Traceback (most recent call last):
  File "./splatnet2statink.py", line 894, in <module>
    monitor_battles(is_s, is_t, is_r, m_value, debug)
  File "./splatnet2statink.py", line 286, in monitor_battles
    post_battle(0, [result], s_flag, t_flag, secs, False, debug, True)
  File "./splatnet2statink.py", line 723, in post_battle
    rank_before = rank_before.lower()

I think lower should go to try clauses, not else.
It seems that getting results[i]["player_result"]["player"]["udemae"] doesn't raise Exception.

        try:
                rank_after = results[i]["udemae"]["name"].lower # It could be non null value if it is the first game of that rule
                rank_before = results[i]["player_result"]["player"]["udemae"]["name"].lower
                rank_exp = results[i]["player_result"]["player"]["udemae"]["s_plus_number"]
                rank_exp_after = results[i]["udemae"]["s_plus_number"]
        except: # based on in-game, not app scoreboard, which displays --- (null rank) as separate than C-
                rank_exp = None # e.g. private battle where a player has never played ranked before
                rank_exp_after = None
                rank_after = None
                rank_before = None

It works in my records.

thanks.

scoreboard sometimes displays out of order

table orders (below) are correct per scoreboard images.

sort-by order: sort_score, k+a, special_count, death_count (higher = better), kill_count, nickname (alphabetical)

see #6 (comment)

  • sort_score per table 3.
  • k+a per tables 1, 2, 3, 4.
  • special_count per tables 1, 2, 3, 4.
  • assist_count per https://stat.ink/@mak4026/spl2/231423
  • death_count (reversed) per table 3.
  • nickname per table 2.

1

https://stat.ink/@frozenpandaman/spl2/40817

nickname udemae sort_score kill_count assist_count k+a death_count special_count
eli B- 0 11 1 12 3 0
Verbz S+ 0 7 3 10 0 5
Zz S+ 0 6 4 10 3 3
SquidHumor A+ 0 3 0 2 7 2

2

https://u.teknik.io/VBFJa.json

nickname udemae sort_score kill_count assist_count k+a death_count special_count
clover C- 0 6 2 8 6 3
Mariobro64 C+ 0 6 2 8 6 3
Brade A 0 4 1 5 7 3
Milarie A+ 0 4 1 5 7 1
  • Points of interest: Proves alphabetical sorting exists.

3

https://stat.ink/@into_the_trash/spl2/52979

nickname udemae sort_score kill_count assist_count k+a death_count special_count
Mauri B- 4 1 0 1 1 0
King Cole B- 0 0 0 0 1 1
Alex >:v B- 0 0 0 0 3 0
Natalie B 0 0 0 0 2 0
  • Points of interest: Proves more deaths leads to a higher ranking than fewer deaths.

4

https://stat.ink/@into_the_trash/spl2/116447 / https://stat.ink/@frozenpandaman/spl2/116448

nickname player_rank udemae star_rank sort_score kill_count assist_count k+a death_count special_count game_paint_point
eli 36 B- 0 0 14 0 14 7 0 1145
clover 19 A 0 0 4 4 8 10 4 1121
Knuckles 21 A- 0 0 4 3 7 11 2 897
& Knuckles 29 S 0 0 6 1 7 11 1 879

5

https://stat.ink/@frozenpandaman/spl2/242243

nickname player_rank udemae star_rank sort_score kill_count assist_count k+a death_count special_count game_paint_point
eli 44 A- 0 2 14 4 18 9 1 896
[ƒ¡r€&ι©ε] 29 A+ 0 0 8 5 8 3 7 1076
johnny 34 A 0 0 6 2 8 6 4 894
[WUT]guy12 48 A+ 0 0 3 5 8 6 4 832

Battle uploaded to None

Hi @frozenpandaman,

I'm trying to debug why I'm getting this message repeatedly after some of the newest updates. It hasn't worked right since around the python3 upgrade, but it was working fine with the initial branch you were testing.

I'm only having this error when it's running on my server, but I'm not sure how to debug it so I don't know how to tell what's different between the two environments.

Support uploading Salmon Run shifts

For reference in case stat.ink ever allows uploading these stats. Irrelevant keys (e.g. image, thumbnail, name if id exists) have been removed.

https://app.splatoon2.nintendo.net/api/coop_results
├── results
│   └── (see below) – but does NOT include other_results
├── reward_gear                           This month's gear         
│   └── id
└── summary                               Last 50 battles summary
    ├── card
    │   ├── golden_ikura_total            Golden Eggs collected
    │   ├── help_total                    Crew members rescued
    │   ├── ikura_total                   Power Eggs collected
    │   ├── job_num                       Shifts (jobs) worked
    │   ├── kuma_point                    Current points
    │   └── kuma_point_total              Total points
    └── stats (list)
        ├── 0                             Shift (job) #1 data
        │   ├── clear_num                 Jobs cleared
        │   ├── dead_total                Total deaths
        │   ├── end_time                  Epoch rotation end time
        │   ├── failure_counts (list)
        │   │   ├── 0                     Wave 1 fail count
        │   │   ├── 1                     Wave 2 fail count
        │   │   └── 2                     Wave 3 fail count
        │   ├── grade
        │   │   └── id                    Title, e.g. 5 = Profreshional
        │   ├── grade_point               Rank (number after title)
        │   ├── help_total                (Total) Crew members rescued
        │   ├── job_num                   Number of jobs worked in rotation
        │   ├── kuma_point_total          (Total) Grizzco Points
        │   ├── my_golden_ikura_total     (Total) Golden Eggs personally collected
        │   ├── my_ikura_total            (Total) Power Eggs personally collected
        │   ├── schedule
        │   │   ├── end_time              Epoch rotation end time
        │   │   ├── stage
        │   │   │   ├── name              Stage name, e.g. Lost Outpost
        │   │   │   └── image             Stage image URL
        │   │   ├── start_time            Epoch rotation start time
        │   │   └── weapons (list)        Weapon list
        │   │       ├── 0
        │   │       │   └── id            -2 = Grizzco random, -1 = regular random
        │   │       ├── 1
        │   │       │   └── id
        │   │       ├── 2
        │   │       │   └── id
        │   │       └── 3
        │   │           └── id
        │   ├── start_time                Epoch rotation start time
        │   ├── team_golden_ikura_total   (Total) Golden Eggs collected
        │   └── team_ikura_total          (Total) Power Eggs collected
        ├── 1                             Shift (job) #2 data
        │   └── ...
        └── ...
https://app.splatoon2.nintendo.net/api/coop_results/[job number]
├── boss_counts
│   ├── 3
│   │   ├── boss
│   │   │   └── key                sakelien-golden
│   │   └── count                  # of Goldie appearances
│   ├── 6
│   │   ├── boss
│   │   │   └── key                sakelien-bomber
│   │   └── count                  # of Steelhead appearances
│   ├── 9
│   │   ├── boss
│   │   │   └── key                sakelien-cup-twins
│   │   └── count                  # of Flyfish appearances
│   ├── 12
│   │   ├── boss
│   │   │   └── key                sakelien-shield
│   │   └── count                  # of Scrapper appearances
│   ├── 13
│   │   ├── boss
│   │   │   └── key                sakelien-snake
│   │   └── count                  # of Steel Eel appearances
│   ├── 14
│   │   ├── boss
│   │   │   └── key                sakelien-tower
│   │   └── count                  # of Stinger appearances
│   ├── 15
│   │   ├── boss
│   │   │   └── key                sakediver
│   │   └── count                  # of Maws appearances
│   ├── 16
│   │   ├── boss
│   │   │   └── key                sakedozer
│   │   └── count                  # of Griller appearances
│   └── 21
│       ├── boss
│       │   └── key                sakerocket
│       └── count                  # of Drizzler appearances
├── danger_rate                    Hazard level (5-200)
├── end_time                       Epoch rotation end time
├── grade
│   └── id                         Title, e.g. 5 = Profreshional
├── grade_point                    Rank after end
├── grade_point_delta              How much rank changed
├── job_id                         Shift (job) ID #
├── job_rate                       Pay grade %
├── job_result
│   ├── failure_reason             wipe_out, time_limit, null
│   ├── failure_wave               1, 2, 3, null
│   └── is_clear                   true/false
├── job_score                      Job Score
├── kuma_point                     Grizzco Points
├── my_result
│   ├── boss_kill_counts
│   │   └── ... (mirrors boss_counts)
│   ├── dead_count                 # of deaths
│   ├── golden_ikura_num           Golden Eggs collected
│   ├── help_count                 # of revivals
│   ├── ikura_num                  Power Eggs collected
│   ├── name                       Nickname
│   ├── pid                        Player ID
│   ├── special                    Assigned Special weapon
│   │   └── id
│   ├── special_counts (list)
│   │   ├── 0                      # of Specials used in wave 1
│   │   ├── 1                      # of Specials used in wave 2
│   │   └── 2                      # of Specials used in wave 3
│   └── weapon_list (list)
│       ├── 0                      Weapon assigned in wave 1
│       │   └── id
│       ├── 1                      Weapon assigned in wave 2
│       │   └── id
│       └── 2                      Weapon assigned in wave 3
│           └── id
├── other_results (list)
│   ├── 0
│   │   └── ... (mirrors my_result)
│   ├── 1
│   │   └── ...
│   └── 2
│       └── ...
├── play_time                      Epoch shift (job) start time
├── player_type
│   ├── species                    inklings, octolings
│   └── style                      girl, boy
├── schedule
│   └── ... (same as summary>stats>schedule)
├── start_time                     Epoch rotation start time
└── wave_details (list)
    ├── 0                          Wave 1
    │   ├── event_type
    │   │   └── key                cohock-charge, fog, water-levels, etc.
    │   ├── golden_ikura_num       Golden Eggs Collected
    │   ├── golden_ikura_pop_num   Golden Egg appearances
    │   ├── ikura_num              Power Eggs collected
    │   ├── quota_num              Golden Egg quota (# required)
    │   └── water_level
    │       └── key                low, normal, high
    ├── 1                          Wave 2
    │   └── ...
    └── 2                          Wave 3
        └── ...

No error message when errored while generating cookie

Hello!

I cannot upload my data to stat.ink anymore. The new cookie won't generate, and now there's no error to know why.

$ python splatnet2statink.py -t
splatnet2statink v1.4.3
Pulling data from online...
Blank cookie.
Attempting to generate new cookie...
$

Last time the error was that the API was outdated. I'm hoping this can be fixed. Thank you!

~Simon

mitmproxy still not working

Hello. I've tried to get the iksm_token using mitmproxy but it's not working.
I've set the proxy and everything, then I've opened http://mitm.it/ but it didn't show a certificate to install.

IndexError in scoreboard creation

  File "splatnet2statink.py", line 337, in set_scoreboard
    "is_me": "yes" if full_scoreboard[n][10] == 1 else "no",
IndexError: list index out of range

in addition, scoreboard creation only checks if mode == gachi or regular/fest, not league

Octo Expansion + v.3.1.0 changes

New species

new stat.ink field:

{"species": "inkling" or "octoling"}

New gear

Headgear ID
Octoleet Goggles* 21004
Octoling Shades 27104
Null Visor Replica 27105
Old-Timey Hat 27106
Conductor Cap 27107
Golden Toothpick 27108
Clothing ID
Fresh Octo Tee 3
Octoleet Armor* 21006
Neo Octoling Armor 27104
Null Armor Replica 27105
Old-Timey Clothes 27106
Shoes ID
Octoleet Boots* 21003
Neo Octoling Boots 27104
Null Boots Replica 27105
Old-Timey Shoes 27106

* Upcoming SR gear

New weapons

Weapon ID
Octo Shot Replica 46

"server maintenance" error

I'm not sure if this is a forwarded error message from nintendo, but I setup my original cookie stat.ink API key, and try to update my stat.ink battles:

./splatnet2statink.py -r
splatnet2statink v1.2.1
Blank cookie.
Attempting to generate new cookie...
Error from the splatnet2statink API:
{
"error": "Server maintenance"
}
This happened the first time when I pasted the URL to get a cookie as well. Is it the blank cookie message I should be tracing down? or the server maint?

I haven't been able to login via squidtracks either, it gets stuck in a loop of choosing login, sleect this person, "logging on..." then back to the "login / login with session cookie".

I tried the session cookie method to no avail as well.

let me know any info I can provide

thanks

Possible bug on salmon mode

So, running the script with ./splatnet2statink.py --salmon on linux prints an html page out.txt
if i select a number of shifts to upload that is higher than the amount of shifts not uploaded i have. If i ask to upload more than 1 overflowing shift (if i have 1 shift not uploaded and i ask to upload more than 2) it prompts to continue and it just keeps printing it again if i say yes.

screenshot from 2019-02-23 11-45-13

screenshot from 2019-02-23 11-47-20

Ver.4 update

Ver.4.0 (September 13)

Kensa Collection #1

Splatfest changes

Ver.4.1+

Moved below.

match the HTTP header to genuine(Splatnet2) application.

Hello.
I want to change the contents of the HTTP request header to be the same as Splatnet 2 app of each user.

  • x-unique-id
  • x-timezone-offset
  • User-Agent

"x-timezone-offset" affects the time display of images. (This refers to the time zone of the smartphone.)
"x-unique-id" is not used in splatnet 2statink. Still it seems to be unique for each user.

As for the time zone, since there is not enough investigation, you need to listen to the story of the people playing in other regions.

Add Timezone offset option.
default uses the OS time zone. We add to "custom keys", so we can set it arbitrarily.

@frozenpandaman Thanks for the smart solution to the suggestion. :)

Add a flag that automatically upgrades the script / ignores it

Hello.

I currently use the script in a from service that runs the .py file with the -r flag. However if there's an update the script doesn't run as it keeps waiting for user input (Do you want to upgrade?).

That's why I'm asking for a new flag that skips the upgrade or automatically upgrades and re-runs the script with the same flags, this would allow to keep the cron running forever without user intervention every time there's an update.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.