URL partial percent encoding
pwyq opened this issue · 5 comments
[]
got encoding to % performat, while commas do not.
And this issue didn't occur on my previous script.
I tried every method in this question; but still see the encoded url in fiddler; while using the official app, the []
are shown as it is.
WIP; urlopen works but require rewrite most session.py
b'x\xdau\x8e\xc1\n\x830\x10D\xffe\xe81\x07c\xa1\xa5\xf9\x83B\x0f\xbd\x97\x12\xa2\xae"\xa4\xae\x98\x8d\x17\xf1\xdf\x1b\x05\xa9\xd0\xf6\xb6o\x1e\xc3\xce\x84C\xc1N\xee\xcc\x1e\xe6\xf1T\xd8\x114\x96 \xd6\xf5G\xf7#\xddh$\x7f\xedj\x86\x99\xe0W\xa8`p9\xea\x13\x14\x828\x89!\xb1N\x10\x03\xd9 \x83\x13j\xda\xd2\xf6\xdcv\x92L\x96L\xc3\xf2\xc7\x94\xfc*\\x82La\xa0\x10\xbd\xac\xffV\xfe*\x9c\xe7_\xa1B\xc7\x15m\x0b\x97\xdb\xb6\xdb\xc2,\xdfm\xcc\xe7\xf9\r*\xd1TD'
Decoded with latin-1
, the result is still unreadable:
xÚu�Á
��$û¶ý,�3Ýh&{�ZF±À®Ð Àå¨Ï1ãÄ�w�Ó�ï¨t2�¡®¯Ë�ûA¢�E§cùãÔüªL�La"ç¬ÿVþ
�Â/Qaà�¶�i.ûa�ï:æ!¼�LXUC
Even chardet has 0 confidence in recognizing the encoding
Buying ships one by one with original GET method fails.
This is the server response for buying one ship:
{
"$boatPool":[
],
"boatPool":[
"1"
],
"buffPool":[ # I believe this field is incorrect
"0&t=1607299565331&e=7f53a7fc158a9cb2693f46abe037b31e&version=5.1.0&channel=100020&gz=1&market=3"
],
"pveLevelInfo":{
"levelId":"9316",
"status":"1",
"use_strategic_point":"0",
"got_strategic_point":"0",
"combat":0,
"resultLevel":0,
"strategic_point":7
},
"strategic_point":7,
"nodeInfo":{
"node_id":"931602",
"status":2
}
}
Since ships can be baught one by one, it is needed to stick with urlopen and use getUserData everytime after purchasing
"nodeId": "931602",
"levelId": "9316",
"strategic_point": 5,
"ticket": 12,
"canChargeNum": 3,
"chargeNum": 0,
"fleet": [],
"boatPool": [
"111",
"1"
],
"buffPool": [],
"chapterId": "10006",
"isFound": "1",
"npcId": "931821001",
"step": "1",
"npcSinkScore": "11586",
"formation": "4",
"chapterList": [
According to Fiddler, the response size of getUserData is ~750, an acceptable size.
The downside of this is that we can't tell if the connection succed or not.