twtrubiks

Results 57 comments of twtrubiks

@yiyu0chang 這個 API_Get_Image 是我自己寫的爬蟲,api 我沒有公開,因為我怕 server 炸掉。 (基本上這個api,就是隨機回傳圖片網址) 但我有把程式碼放出來,可以參考我之前寫的文章 [auto_crawler_ptt_beauty_image](https://github.com/twtrubiks/auto_crawler_ptt_beauty_image) [Deploying_Django_To_Heroku_Tutorial](https://github.com/twtrubiks/Deploying_Django_To_Heroku_Tutorial)

你好,看起來你佈署是失敗的或是啟動時有問題, 去看看heroku的log 資訊,方法可參考下方(我之前寫的文章) 請參考 [LOG 資訊](https://github.com/twtrubiks/Deploying-Flask-To-Heroku#log-%E8%B3%87%E8%A8%8A)

咦? 你佈署沒按照我的步驟嘛? 這個不是在 [requirements.txt](https://github.com/twtrubiks/line-bot-tutorial/blob/master/requirements.txt#L19) 裡面了?

如果你沒有用到 BeautifulSoup,也沒有安裝 BeautifulSoup,要把 from bs4 import BeautifulSoup 拿掉 我有用到 BeautifulSoup ,所以我有放在 requirements.txt 裡面

@hewenji 這個 API_Get_Image 是我自己寫的爬蟲,api 我沒有公開,因為我怕 server 炸掉。 但我有把程式碼放出來,可以參考我之前寫的文章 [auto_crawler_ptt_beauty_image](https://github.com/twtrubiks/auto_crawler_ptt_beauty_image) [Deploying_Django_To_Heroku_Tutorial](https://github.com/twtrubiks/Deploying_Django_To_Heroku_Tutorial)

@Sn0wl3r0ker api 放什麼? 你是指 API_Get_Image 這個嗎?

@Sn0wl3r0ker hi~ 可能是我說的不夠清楚,如果你建立起來了,api code 在 [here](https://github.com/twtrubiks/Deploying_Django_To_Heroku_Tutorial/blob/master/images/views.py#L49)。 url 應該是 http://xxxx.herokuapp.com/api/image/random/ 這樣才對,如果你不喜歡你可以再改, 基本上就是從資料庫隨機抽一張。

@Sn0wl3r0ker 面試過後,發現還是很多要學,太弱了QAQ 不過能幫上你真好^0^

@Redwolfaj The method should be similar, but I have not tried it.