自問自答
https://ithelp.ithome.com.tw/articles/10274773
參考這篇的寫法,多建一個start.py作為程式進入點
並且把原先放在scrape_ui.py的onButtobClick和display_text移去main_controller.py
除此之外scrape_shopee_controller.py的那些執行步驟也一併移去main_controller.py裡
面
下面是改完之後的程式碼
start.py
https://pastebin.com/XrJu1aCF
scrape_ui.py
https://pastebin.com/0pACvq9L
main_controller.py
https://pastebin.com/XtXQipvk
scrape_shopee_controller.py
https://pastebin.com/uFJ2itVY
scrape_ruten_controller.py
https://pastebin.com/kq4Qza3D
現在的UI介面
https://imgur.com/vJgIJbV.jpg
感覺main_controller還能寫得更乾淨一點,不過現在能跑就好