Coder Social home page Coder Social logo

pttlifeismoneylinebot's Introduction

PttLifeismoneyLineBot

這是一個小小的side project,如果發現程式有問題,歡迎提交Issues

準備環境

目前自己的運行環境如下。

Linux raspberrypi 5.4.79

Python 3.7.3

Apache 2.4.38

MariaDB 10.3.27

PHP 7.3.19

phpMyAdmin 4.6.6deb5

ngrok 2.3.35

部屬步驟

自行建立一個資料庫,再從phpMyAdmin匯入ptt_lifeismoney .sql檔案

安裝Python套件

pip3 install PyMySQL
pip3 install requests
pip3 install requests-html
pip3 install beautifulsoup4
pip3 install line-bot-sdk
pip3 install django
pip3 install flask

開啟ngrok

ngrok http -subdomain=自定義名稱 5000
ngrok http -subdomain=自定義名稱 5001

在目錄下設置config.ini檔案

[MySQL]
host = 預設為127.0.0.1
port = 預設為3306
user = 帳號
password = 密碼
db = 資料庫名稱

[line-bot]
channel_access_token = 你的channel_access_token
channel_secret = 你的channel_secret
notify_URL = https://notify-bot.line.me/oauth/authorize?response_type=code&scope=notify&response_mode=form_post&client_id=xxxxxxxxxxxxxxxxxxxx&redirect_uri=http://xxxxxxxx.ngrok.io/&state=f094a459-1d16-42d6-a709-c2b61ec53d60

[line-notify]
client_id = 你的notify id
client_secret = 你的notify secret
redirect_uri = ngrok中要使用的網址

pttlifeismoneylinebot's People

Contributors

h1431532403240 avatar henry0411 avatar rrtyui55123 avatar

Watchers

 avatar

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.