ingresstools
ingresstools copied to clipboard
No JSON Object
Traceback (most recent call last):
File "actionlog.py", line 98, in
Where is the problem? And how i can define area for reading?
I have same issue too. I have inserted debug code. line 58 is debug code.
56 def messagegen(self):
57 jsonStr = self.getChat(self.minTimestampMs)
58 print(jsonStr)
59 responseItems = json.loads(jsonStr)
It resutls. jsonStr is not JSON fortmat. It is just HTML. That is why This program told us 'No JSON object'.
It seems to me that Ingress protocol has been changed. We need to find how to get JSON Format messages. Who knows?
Hey there. I haven't played for a long time, but I took a quick look at the intel map. I believe the problem is simply that the url to get chat messages has changed since I made this. It now looks to be something like 'https://www.ingress.com/r/getPlexts' instead of 'http://www.ingress.com/rpc/dashboard.getPaginatedPlextsV2'. I think other minor bits of the interface have changed as well, but the actual messages themselves look the same. You are probably getting html instead of json because the bad url gets redirected to either the front page or an error page.
To see what's going on open up the intel map in chrome and press F12 to open the development toolbar. Click on the Network tab, and then move the map to a new area. You should look for requests to 'getPlexts'.
The geographic area is currently hardcoded to minneapolis. The requests to getPlexts has a lat/long boundary specified. You'll need to change it to yours (or better yet, submit a patch that makes it configurable!). You can take a look at the relevant code for both of these problems here: https://github.com/bluemoo/ingresstools/blob/master/src/actionlog.py#L38
Actually, this fork looks recently updated: https://github.com/tinbotu/ingresstools
Thank you for your response. @bluemoo
I had tried to use 'https://github.com/tinbotu/ingresstools'. Unfortunately, his program returned 'None' in getChat method.
It seems to me that @tinbotu 's program which is PhantomJS makes 'cookies.json' which contain SESSION_ID and .CSRF_TOKEN. And send GOOGAPPUID to server. I can not find GOOGAPPUID in coolies.json. Yes, I misunderstand to set up his program which do 'cd munge;make' then python actionlog.py
Anyway, Now that time, I need to understand intelmap's requests and responses. Thank you.
P.S. About 10 days ago, a lot of iOS players join Ingress. I have lived in Japan. Environment has changed.
Hi, @yabuki, @bluemoo
GOOGAPPUID has gone a few days ago.
API of Ingress changes at short intervals (every 1 or 2 weeks), sometimes large change comes suddenly (every 2 or 3 months).
In my 'https://github.com/tinbotu/ingresstools', PhantomJS script decodes obfuscated API "munge" with IITC's library semi-automagically. Extras, gets SESSION_ID, CSRF_TOKEN, GOOGAPPUID etc from cookie instead of to copy from developers console by hand work.
though few weeks ago, suddenly "munge" has completely obsoleted. and a few days ago, GOOGAPPUID has gone.
now I think that to analyze API of Ingress is not difficult, but following to change frequently is so hard.
PS. @yabuki I fixed it and works for me. but its API tired me a little.., and I think this can (probably will) get you banned from Niantic.