https://github.com/opda0887/bahamut-crawler-to-gmail
發想:使用Python爬蟲取得巴哈姆特版面的最新論壇,並用gmail傳送這些訊息給自己。A thought: Use Python crawler to the latest forums in Bahamut, and use gmail to send these messages to myself.
https://github.com/opda0887/bahamut-crawler-to-gmail
crawler crawler-python
Last synced: 3 months ago
JSON representation
發想:使用Python爬蟲取得巴哈姆特版面的最新論壇,並用gmail傳送這些訊息給自己。A thought: Use Python crawler to the latest forums in Bahamut, and use gmail to send these messages to myself.
- Host: GitHub
- URL: https://github.com/opda0887/bahamut-crawler-to-gmail
- Owner: opda0887
- Created: 2022-10-04T00:47:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-10T08:52:17.000Z (over 2 years ago)
- Last Synced: 2025-01-26T10:45:35.895Z (5 months ago)
- Topics: crawler, crawler-python
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tutorial(使用教學)📝
### 🌳環境設定(Env Setting)
**如果可以,使用 VS Code,以方便跟著我接下來的步驟**
在 cmd 中打上:
```pip install Scrapy```
```pip install BeautifulSoup4```
```pip install twisted```### 👀**成果預覽畫面(Preview)**:
## 👌**使用說明(Features)**:
1. 找到:Bahamut-Crawler-To-Gmail-main -> Baha -> spiders -> **clawer** 並打開找到"***categorys***"

在這裡可以挑選日後要在巴哈上取得的資料2. 在**clawer**檔案中中找到"***titles***",並依自己需求替換成"***categorys***"中你喜歡的板的名稱**(全名)**

我拿:場外休息區 作範例("***categorys***"中的第一個)3. 找到 # send email 那行,我們要設定誰要接收到巴哈的資料

email_sender = '\\' 中的 **\** 替換成**發送mail的帳號**( ‼一定要是gmail,否則後續會出錯)
email_password = '\\' :第4步會詳細解釋該替換成甚麼
email_receiver = '\\' 中的 **\** 替換成**接收mail的帳號**(任何mail帳號都可、也可和 **email_sender** 一樣)4. 設定password
先到 https://myaccount.google.com/ 中,點選左方欄位的**安全性**

往下滑並找到 **登入 Google** 欄位中的 **兩步驟驗證**,並完成設定
接著,到 https://myaccount.google.com/apppasswords 中,找到名為**選取應用程式**並點選其中的**其他(自訂名稱)**

名稱隨意取,之後按下**產生**就來到以下畫面

右上角黃色格子內的是你的**email_password**,將他複製並將 email_password = '\\' 中的 **\** 改成你**複製的代碼**即可5. 在 Bahamut-Crawler-To-Gmail-main -> Baha -> rutineRun 中打開**rutineRun**,你會看到程式碼中有一變數**timeSet**

你可以改成你要的數字,取決於你想**間格多少秒接收到一次新的data**6. 在**rutineRun**中,於terminal中執行以下指令:
```python routineRun.py```

之後去看你設定接收mail的那隻帳號,就會發現到你所設定版面的全新資訊瞜❤️If you have any feedbacks, just contact me (≧∀≦)