NTU Class Crawler - 台大上課教室看板課表整理小工具

文章推薦指數: 80 %
投票人數:10人

1. Execute crawl_tk.exe directly (For Windows only). 此方法不用裝python也可以使用,直接執行就好很方便,推薦一般人使用. 直接下載 dist/crawl_tk ... Skiptocontent {{message}} hungchun0201 / NTUclassCrawler Public Notifications Fork 7 Star 28 28 stars 7 forks Star Notifications Code Issues 0 Pullrequests 1 Actions Projects 0 Security Insights More Code Issues Pullrequests Actions Projects Security Insights hungchun0201/NTUclassCrawler Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository. master Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default 2 branches 2 tags Code Clone HTTPS GitHubCLI UseGitorcheckoutwithSVNusingthewebURL. WorkfastwithourofficialCLI. Learnmore. OpenwithGitHubDesktop DownloadZIP LaunchingGitHubDesktop Ifnothinghappens,downloadGitHubDesktopandtryagain. LaunchingGitHubDesktop Ifnothinghappens,downloadGitHubDesktopandtryagain. LaunchingXcode Ifnothinghappens,downloadXcodeandtryagain. LaunchingVisualStudioCode Yourcodespacewillopenonceready. Therewasaproblempreparingyourcodespace,pleasetryagain. Latestcommit   Gitstats 34 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime .streamlit     build/crawl_tk     dist     img     .gitignore     Pipfile     app.py     crawl.py     crawl_tk.py     crawl_tk.spec     readme.md     requirements.txt     run_app.py     Viewcode NTUClassCrawler-台大上課教室看板課表整理小工具 Introduction OnlineService HowtoUseLocally Environment GUI(Recommended) Demo 1.Executecrawl_tk.exedirectly(ForWindowsonly) 2.CreatevirtualenvinAnaconda(ForWindows/Mac/Linux) Terminal Demo OptionalArguments Examples LocalWepAppDeployment Demo Steps readme.md NTUClassCrawler-台大上課教室看板課表整理小工具 NTUClassCrawler-台大上課教室看板課表整理小工具 Introduction OnlineService HowtoUseLocally GUI(Recommended) Demo 1.Executecrawl_tk.exedirectly(ForWindowsonly) 2.CreatevirtualenvinAnaconda(ForWindows/Mac/Linux) Terminal Demo OptionalArguments Examples LocalWepAppDeployment Demo Steps Introduction 雖然上課教室看板會先顯示下學期的一些課表,但因為系統設計的關係,查找其實不易。

此程式會從上課教室看板上面爬取下學期的課表,並有條理地整理,因此可以在台大課程網更新前就先大致安排你的課表。

雖然上面的資訊不完整,但若是想要事先安排課表的話還是相當方便。

Thisisaprogramthatcancrawldataofclassesinnextsemesterfrom "classroommanagementsystem上課教室看板".Withthisprogram,youcanarrangeyourclassesbeforetheycomeoutatNTUonline.Whiletheinformationisnotquite completeonthewebsite,itisstillausefulandhelpfultoolifyouwantto organizethecurriculumfornextsemesterinadvance. 你可以選擇使用圖形化介面,也可以直接在terminal中執行程式。

最後,也有提供簡易網頁版,可以讓你不用下載整份程式碼也能順利查找課表。

YoucanexecutethisprogrameitherinGUIorterminal.Inaddition,thewebsiteversionofthisprogramisservedheresothatyouwon'thavetocloneandbuildfromscratch. OnlineService Designedby@icheft 👉🏽傳送門·WebAppLink HowtoUseLocally Environment GUI(Recommended) TestedonWindows10 Demo 共有兩種方法可執行GUI程式。

Therearetwowaystousethisprogram. 1.Executecrawl_tk.exedirectly(ForWindowsonly) 此方法不用裝python也可以使用,直接執行就好很方便,推薦一般人使用 直接下載dist/crawl_tk.exe並執行即可。

Downloaddist/crawl_tk.exeandexecuteitdirectly. 2.CreatevirtualenvinAnaconda(ForWindows/Mac/Linux) 下載crawl_tk.py以及requirements.txt後,在Anaconda中建立python3.7環境。

並執行以下指令 Afteryoudownloadthefiles,createavirtualenvwithpython=3.7inAnaconda.Then,execute pipinstall-rrequirements.txt pythoncrawl_tk.py Terminal TestedonWindows10 Demo python3crawl.py-b[building]--semester[semester] OptionalArguments optionalarguments: -h,--helpshowthishelpmessageandexit --semesterSEMESTERSelectthesemesteryouwanttoquery --delay-timeDELAYSetthedelaytimebetweeneachrequest -pPAGE,--pagePAGEAssignthemaximumpageofeachday. -s[SAVE],--save[SAVE] Storetheresult.Youcanspecifyyourfilename. Pleaseuse.xlsor.xlsxasfilenameextension. -b{1,2,3,4,5,6,7,8,9,A,B,共同,普通,新生,綜合,博雅,%} Specifythebuildingyouwanttoquery. Ifthebuildingbelongstoacollege(ex:CollegeofElectricalEngineeringandComputerScience), usethecodeofthatcollege(ex:9),orsimplytypethenameofthebuilding(ex:博雅). Thepercentagesignmeanssearchforallbuildings. Thedefaultissetas9. --search-optSEARCHOPT Commaseparatedvaluestospecifysearchoptionse.g."Title=積體電路,Classroom=電二" Theavailableargsinclude: "Id":CurriculumIdentityNumber "Class":Theclassnumber.Ifthecourseistaughtbyonlyoneteacher,itissetto00 "Title":Coursetitle "Instructor":Teachername "Classroom":ScheduleClassroom "Time":Thetimeofcourse Forexample,ifyoutype"--search-optTitle=積體電路,Classroom=電二",youmaygetthefollowingresult: IdClassTitleInstructorClassroomTime 0943U001000積體電路測試李建模電二146二2,3,4 1921U959000電力電子與積體電路控制陳景然電二225二7,8,9 2943U012000射頻積體電路設計陳怡然電二104三2,3,4 39014050000積體電路設計盧奕璋電二229三7,8,9 4942U012000微波積體電路專題林坤佑電二101四7,8,9 Youcanviewallhelpmessagebytyping python3crawl.py-h Examples Thedefaultofthebuildingissetas9(EECS).Remenertospecifythe-boption. Ifyouwanttofindtheclasswhosenameis機器學習inEECSandstoretheresulttoexcelwithfilenameML.xls,youcanuse python3crawl.py--search-optTitle=機器學習--saveML.xls-b9--semester1101 ormaybeyoujustwanttofindtheclassesteachedinBioresourcesandAgriculturecollege,andsaveitlocally.Youcanjusttype python3crawl.py-b6--saveAgri.xlsx--semester1101 Acommonwayofusingthisprogramistodownloadallofthecoursesintoaxlsxfile,andyoucansearchdirectlyinthexlsxfilelocally. (Itmaytakeawhiletoexecuteit,sinceyouwanttogothroughallofthepagesinthewebsite.) python3crawl.py-b%--savecourse.xlsx--semester1101 LocalWepAppDeployment 如果私服器(目前資料存放于台大資管系)有任何問題,或是你想在自己的電腦嘗試部署WebApp,也可以利用以下作法在local端建置。

IftheserverheldintheDepartmentofInformationManagementfailsoryouwanttodeploythiswebapplocally,herearesometipstogetyoustarted. TestedonmacOS Demo 👉🏽傳送門·WebAppLink Responsivedesignaswell🙌🏾 Steps *註:此部分僅為local端佈建使用。

Thispartservesforpeoplewhowanttodeploylocally. Gitclonethisrepository Makesureyou'veinstalledalltherequiredpackagesinthedesiredenvironment(pipenvuseslessresourcesthanAnaconda) pipinstallpipenv pipenv--three pipenvinstall--dev pipenvshell Runthefollowingcommand(default) python3run_app.py--deploy Someoptionalcommandsarelistedbelow: optionalarguments: -h,--helpshowthishelpmessageandexit --semesterSEMESTERSelectthesemesteryouwanttoquery --toCSVExportcsvfile -d,--deployDeployyoursitelocally -f,--forceOverridecurrentcourse.xlsxfile Ifdeploycommandisnotpassed,theappwon'tbedeployed. Bewareofthe--forcecommandasitmaytakesuperlongtimetocrawlthedatafromscratch Ifcourse.xlsxisnotfoundatruntime,theprogramwillautomaticallystartcrawling Ifdonesuccessfully,youshallseesomethinglikethis: course.xlsxfilealreadyexists Readytodeploy... YoucannowviewyourStreamlitappinyourbrowser. LocalURL:http://localhost:8501 NetworkURL:http://192.168.2.235:8501 About Nodescription,website,ortopicsprovided. Resources Readme Stars 28 stars Watchers 1 watching Forks 7 forks Releases 2 Addwebservice Latest Jul11,2021 +1release Packages0 Nopackagespublished Contributors5 Languages HTML 60.1% TeX 38.5% Python 1.4% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?