Update README.md

增加  how to execute source code.
master
Max 2021-02-27 01:22:42 +08:00 committed by GitHub
parent 2d011304be
commit 7fa4fbf680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -12,13 +12,20 @@ https://max-everyday.com/2018/03/tixcraft-bot/
or or
https://max-everyday.com/2018/12/kktix-bot/ https://max-everyday.com/2018/12/kktix-bot/
# How to execute source code (執行方法) # How to execute source code (透過原始碼的執行方法)
1: download chromedrive to "webdriver" folder: 1: download chromedrive to "webdriver" folder:
http://chromedriver.chromium.org/downloads http://chromedriver.chromium.org/downloads
2: <code>pip install selenium</code> change the chromedrive in chrome_tixcraft.py, source code:
<code>chromedriver_path =Root_Dir+ "webdriver/chromedriver"</code>
the default path is the script path + "webdriver/chromedriver", my suggestion is make a new directory then move the chromedrive under new folder.
3: <code>python settings.py</code> 2: <code>pip install selenium</code> or <code>pip3 install selenium</code>
3: <code>python settings.py</code> or <code>python3 settings.py</code>
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 (實作方法) # Introduce the implement (實作方法)
https://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/ https://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/