From 7fa4fbf680c712dd8ab7fe45ecfb9db0e598162b Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 27 Feb 2021 01:22:42 +0800 Subject: [PATCH] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加 how to execute source code. --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3673770..ea8e9f6 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,20 @@ https://max-everyday.com/2018/03/tixcraft-bot/ or https://max-everyday.com/2018/12/kktix-bot/ -# How to execute source code (執行方法) +# How to execute source code (透過原始碼的執行方法) 1: download chromedrive to "webdriver" folder: http://chromedriver.chromium.org/downloads -2: pip install selenium +change the chromedrive in chrome_tixcraft.py, source code: +chromedriver_path =Root_Dir+ "webdriver/chromedriver" +the default path is the script path + "webdriver/chromedriver", my suggestion is make a new directory then move the chromedrive under new folder. -3: python settings.py +2: pip install selenium or pip3 install selenium + +3: python settings.py or python3 settings.py + +PS: this script able to run in python2 or python3. +PS: 原始碼可以在python2 或 python3 下執行,請先確定你的python 執行環境下已安裝 selenium 或相關的套件,參考 pip-reg.txt。還需要手動下載新版的 chromedrive 或 firefox drive(geckodriver), 建議在 source code 下建立一個 webdrive 的目錄,並把 chromedirve 的執行檔放進去,或是手動地修改 chrome_tixcraft.py 裡的 chromedriver_path 為你環境下能存取到 chromedrive 的路徑。最後透過 python 或 python3 執行 settings.py 就可以有 GUI 的設定界面。 # Introduce the implement (實作方法) https://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/