heroku site:
[my-stock-view]
https://my-stock-view.herokuapp.com/
LineBot ID:
@687oreey
GitHub:
www.github.com/taco0929/my-stock-view
-
account
Views for all account pages.
-
catalog
Models and views of
my-stock-view
. -
crawler
Scripts for data crawling.
-
mylinebot
Scripts for Linebot to handle reply and push messages.
-
Push to your
heroku
site:$ git push heroku <branch>
-
Migrate database:
$ heroku run python manage.py migrate
-
Setup your database by CLI:
-
It is suggested only select few stocks instead of all of them due to limitation of Heroku Posgresql.
-
get_stock_list
will build upStock
items and crawl for information (asStockInformation
) and hisory daily price (asHistoryPriceSummary
).$ heroku run python manage.py shell >>> from crawler.scripts.crawler_functions import get_stock_list, get_stock_cur_price >>> get_stock_list() >>> get_stock_cur_price()
-
-
Add Heroku Scheduler to your heroku app, and setup following scheduled tasks:
# setup stock price crawl task $ python manage.py crawl stock (10 min) # setup news crawl task $ python manage.py crawl news (1 hr) # setup stock daily price summary crawl task $ python manage.py crawl stock_sum (1 hr) # setup database control task $ python manage.py DBControl (1 d)
You can subscribe stocks on my-stock-view
, and after connecting Line ID with your account, and will push stock price, news and stock daily price summary to you.
-
Create a my-stock-view account:
https://my-stock-view.herokuapp.com/account/signup/ -
Add Linebot @687oreey on your Line
-
Direct to connect Line and press
產生驗證碼
to get verification token -
Send your verfication code to Linebot