Python Line API
30 Jul 2015
Tags:
python
·
$ apt-get install -y automake libtool flex bison pkg-config g++ libssl-dev make libqt4-dev git debhelper cmake
$ cd /tmp
$ curl http://archive.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz | tar zx
$ cd /tmp/thrift-0.9.1
$ ./configure
$ make && make install
$ rm -rf /tmp/thrift-0.9.1
# installl line and remove first that tricky don't know why
$ pip install line && pip uninstall -y line
$ git clone https://github.com/carpedm20/LINE.git
$ cd LINE/line
$ wget https://gist.github.com/windows98SE/b739038218b6fe4d423f/raw/5f68cf3d9a2a88576b739810a6bd6fcaa0c5e940/api.py.patch
$ patch api.py < api.py.patch
$ python config.py
$ python setup.py install
Sample Bot
Line API Patched Dockerfile on Ubuntu
Line send message by LineID
References:
- Python Line API Repository
- Line API Documentation
- StepHack.Com : มาเขียน บอท line ด้วย Python กันเถอะ
- How to use LINE API in python ( lt’s work)
- Line reverse engineering