My Environment
- Operating System: Windows 11
- Python Version: 3.12.5
- Browser: Edge, with official driver installed
Description
I was running the main.py and the requests ceased automatically after a certain period of time. I have tried different parameters in config.ini, but the issue persists. Specifically, after the console output something like 2024-09-13 16:29:39,813 - WARNING - 26.57% 的请求被拒绝,真实请求速度为 10.84 req/s,其中最低请求速度的课程为 1.36 req/s , there was no new output. Prior to this, thousands of requests had been sent cumulatively. Record in ruccourse.log was terminated too.
Many of my friends have encountered the same issue.
Solution
I created a .bat file to run and stop the script forcefully in a loop, though not elegant enough.
-
Step 1: Press Windows + R , type notepad and press Enter to open Notepad.
-
Step 2: Copy the following script:
@echo on
:loop
echo Running script...
start /b python -u "path/to/main.py"
timeout /t 300 /nobreak >nul
taskkill /f /im python.exe
goto loop
-
Step 3 : Paste the Script into Notepad, save the file in the "Save as type" dropdown, selecting All Files. Then name the file something like run_script.bat , and click Save.
-
Step 4: Double click it and run.
My Environment
Description
I was running the
main.pyand the requests ceased automatically after a certain period of time. I have tried different parameters inconfig.ini, but the issue persists. Specifically, after the console output something like2024-09-13 16:29:39,813 - WARNING - 26.57% 的请求被拒绝,真实请求速度为 10.84 req/s,其中最低请求速度的课程为 1.36 req/s, there was no new output. Prior to this, thousands of requests had been sent cumulatively. Record inruccourse.logwas terminated too.Many of my friends have encountered the same issue.
Solution
I created a
.batfile to run and stop the script forcefully in a loop, though not elegant enough.Step 1: Press
Windows + R, typenotepadand pressEnterto open Notepad.Step 2: Copy the following script:
Step 3 : Paste the Script into Notepad, save the file in the "Save as type" dropdown, selecting All Files. Then name the file something like
run_script.bat, and click Save.Step 4: Double click it and run.