2018-TOC
- 可以查詢系上教授lab的網址和照片
- 可以輸入姓(Last Name),會回應相同姓的教授名字
- 輸入 hello , 會回應 Hello!!!
- 輸入 help , 會回應操作提示
##Execution
$ python3 app.py
- input :
help
output :Input name or search or hello or help
- input :
hello
output :Hello!!!
- input :
search
output :Input Last name
input :蘇
output :蘇文鈺 \ 蘇銓清 \
- input :
search
output :Input Last name
input :哈
output :Search nothing
- input :
name
output :Input teacher's name
input :蘇文鈺
output :choose the button Picture lab website
choose Picture button
output : [picture] - input :
name
output :Input teacher's name
input :莊坤達
output :choose the button Picture lab website
choose lab website button
output : [http://dlt.csie.ncku.edu.tw]
- 使用 BeautifulSoup , 抓取教授的名字、lab website、image
- link
- 使用 sqlite3 , 將教授的名字都存進資料庫中(先用爬蟲抓取所有教授的名字,再放進資料庫中)
- link
curl -X POST -H "Content-Type: application/json" -d '{
"recipient":{
"id":"1254459154682919"
},
"message":{
"attachment":{
"type":"image",
"payload":{
"url":"http://www.messenger-rocks.com/image.jpg",
"is_reusable":true
}
}
}
}' "https://graph.facebook.com/v2.6/me/messages?access_token=<PAGE_ACCESS_TOKEN>"
curl -X POST -H "Content-Type: application/json" -d '{
"recipient":{
"id":"<PSID>"
},
"message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"button",
"text":"Try the postback button!",
"buttons":[
{
"type":"postback",
"title":"Postback Button",
"payload":"DEVELOPER_DEFINED_PAYLOAD"
}
]
}
}
}
}' "https://graph.facebook.com/v2.6/me/messages?access_token=<PAGE_ACCESS_TOKEN>"