tixcraft_bot/README.md

89 lines
4.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# tixcraft_bot
MaxBot是一個免費、開放原始碼的搶票機器人。祝您搶票成功。
MaxBot is a FREE and open source bot program. Good luck getting your expected ticket.
# Download (搶票程式下載)
https://github.com/max32002/tixcraft_bot/releases
# Demo (示範影片)
Max搶票機器人 (2023-01-01):支援新版本的 cityline
https://youtu.be/R5LY7pJgAzI
Max搶票機器人 (2023-01-01):支援新版本的 urbtix
https://youtu.be/_6jxqVC39x8
Max搶票機器人 (2022-12-22):支援新版本的 cityline
https://youtu.be/KOhQ2XdfjjQ
Max搶票機器人 (2022-11-24)KKTix 支援避開「剩餘 1」的區域的功能。增加關鍵字#2 的欄位。
https://youtu.be/nupJlwRNOIA
Max搶票機器人 (2022-11-18):增加 adblock plus 的功能。輸入驗證碼時,會播放音效,在清票時很有幫功,不需要一直緊盯著螢幕。
https://youtu.be/Atujl8MPHQI
Max搶票機器人 (2022-11-06)優化kktix/拓元的關鍵字比對,修改為不區分逗號、空格與大小寫。
https://youtu.be/v9mI02kVaNw
Max搶票機器人 (2022-10-22)優化kktix/拓元的價格的關鍵字比對。
https://youtu.be/NZzQcDQkrNI
Max搶票機器人 (2022-10-21)針對kktix 活動增加第二個關鍵字欄位。
https://youtu.be/x-OdqvUupiA
Max搶票機器人 (2022-01-26):
https://youtu.be/ZV-G91FHVik
Max搶票機器人 (2022-03-24):
https://youtu.be/AmOYg8Oj0qM
# How to use (如何使用)
https://max-everyday.com/2018/03/tixcraft-bot/
or
https://max-everyday.com/2018/12/kktix-bot/
# How to execute source code (透過原始碼的執行方法)
1: download chromedrive to "webdriver" folder:
http://chromedriver.chromium.org/downloads
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 to create a new directory, then move the chromedrive under new folder.
2: <code>python3 -m pip install selenium</code>
3: <code>python3 settings.py</code>
PS:
* this script only running in python3. (原始碼只可以在 python3 下執行。)
* 請先確定你的python 執行環境下已安裝 selenium 及相關的套件,請參考 pip-reg.txt 檔案內容。
* 如果是 2022-09-13 之前的版本請到ChromeDriver網站 ([https://chromedriver.chromium.org/](https://chromedriver.chromium.org/)) 下載與您目前相同版本的 ChromeDriver 的執行檔放在搶票程式的webdriver目錄下(Mac電腦請放到 MaxBot.app 套件裡的 /Contents/Resources/webdriver/),在執行搶票程式前,第一次執行搶票主程式前,前請先手動點 ChromeDriver 的執行檔。
* 透過 python3 執行 settings.py 就可以有 GUI 的設定界面。
* 如果你是使用 macOS 並且執行環境沒有 python3請 python 官方網站([https://www.python.org/downloads/](https://www.python.org/downloads/))來安裝 python3, 如果在 macOS 裡會使用終端機(Terminal),建議使用 https://brew.sh/ 安裝 python3.
* 如果你是使用 Firefox, ChromeDriver 的元件是叫 geckodriver下載點在https://github.com/mozilla/geckodriver/releases ,與 ChromeDriver 的處理方式是一樣,如果是 mac 電腦要在元件按右鍵開啟做一次授權的動作mac 有2個版本-macos.tar.gz 與 -macos-aarch64.tar.gz ,如果是 intel CPU 的版本,請服用前面沒有 aarch64 的版本。
# Introduce the implement (實作方法)
https://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/
# Execute suggestion (搶票建議)
please run this source code with high performance hardware computer and high speed + stable network.
門票的「限量」是很殘酷的,建議不要用破舊的電腦或連線不穩的手機網路來搶票,因為只要比別人慢個 0.1 秒,票可能就沒了。為了要搶到限量的票真心建議去一下網咖或找一個網路連線穩定且快的地方並使用硬體不差的電腦來搶票。
# TODO about cpatcha (關於驗證碼)
目前驗證碼需要手動輸入也許你會想自動輸入驗證碼可以參考看看實作基於CNN的台鐵訂票驗證碼辨識以及透過模仿及資料增強的訓練集產生器 (Simple captcha solver based on CNN and a training set generator by imitating the style of captcha and data augmentation)
https://github.com/JasonLiTW/simple-railway-captcha-solver
# Donate (贊助Max)
如果你覺得這篇文章或MaxBot寫的很好想打賞Max贊助方式如下 https://max-everyday.com/about/#donate