- Only collect one city on one server except the Ingress actions in collecting area are very few.
- Request once or less per minute (once every 5 or 10 minutes may satisfy small citys)
- Do not show old actions info for any agents (like data 90 days ago)
-
Python 3.4+
-
Django 1.7rc1+
-
psycopg2 (if you want to use PostgreSQL)
-
requests
Ubuntu 14.04 already have Python 3.4.0 in it officially. But if needed, can be built from source
sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev libncursesw5-dev libreadline-gplv2-dev libgdbm-dev libsqlite3-dev tk-dev python-dev autoconf
And then:
(Replace 3.3.2 to latest version)
wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2 && \
tar jxf ./Python-3.3.2.tar.bz2 && \
cd ./Python-3.3.2
./configure
make && sudo make install
-
创建一个
settings_local.py
文件(与settings.py
同目录) -
在Intel里登录自己的Ingress账号(有可能被封哟),然后用Chrome的Inspect Element 功能查看请求
POST /r/getPlexts
的Request Header 里找步骤3里需要的值 -
在
settings_local.py
里填写好以下值
INGRESS_INTEL_COOKIE = ""
INGRESS_INTEL_CSRF_TOKEN = ""
INGRESS_INTEL_PAYLOAD_V = ""
并将以下坐标范围改成你所在城市的 (用Google地图可以看经纬)
MIN_LAT = 40011769
MAX_LAT = 40011769
MIN_LNG = 116401091
MAX_LNG = 116401091
然后就可以测试使用了:
python3 manage.py test_collect
如果输出是些 JSON 结构、说明测试成功,否则继续做好1、2、3步里的操作。
Use python3 manage.py help
to see other ingress commands.
Ingress Beijing China - http://ingress.mitnk.com