parent
							
								
									0debf35541
								
							
						
					
					
						commit
						b5cd47758b
					
				| @ -0,0 +1,12 @@ | |||||||
|  | { | ||||||
|  |   "userid": "foobar123", | ||||||
|  |   "username": "114514@1919.com", | ||||||
|  |   "password": "810810", | ||||||
|  |   "callback_url": "http://localhost:114514/xxx", | ||||||
|  |   "check_interval": 42, | ||||||
|  |   "check_list": { | ||||||
|  |     "1145141919": { | ||||||
|  |       "url": "https://x.com/i/lists/1873731145141919810" | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
| @ -0,0 +1,4 @@ | |||||||
|  | requests | ||||||
|  | loguru | ||||||
|  | retry  | ||||||
|  | selenium | ||||||
| @ -0,0 +1,24 @@ | |||||||
|  | @REM @echo off | ||||||
|  | @REM set SCRIPT_NAME=twitter.py | ||||||
|  | @REM set SCRIPT_PATH=C:\users\wlt233\Desktop\Overflow\asset\twitter\twitter.py | ||||||
|  | @REM set CHECK_INTERVAL=30 | ||||||
|  | 
 | ||||||
|  | @REM :LOOP | ||||||
|  | @REM rem 检查 Python 脚本是否正在运行 | ||||||
|  | @REM wmic process where "caption='python.exe' and commandline like '%%twitter.py%%'" get commandline 2>nul | findstr /I "%SCRIPT_NAME%" >nul | ||||||
|  | @REM if %errorlevel% neq 0 ( | ||||||
|  | @REM     echo Script not running, starting... | ||||||
|  | @REM     start "" "C:\Python39\python.exe" "%SCRIPT_PATH%" | ||||||
|  | @REM ) else ( | ||||||
|  | @REM     echo Script running | ||||||
|  | @REM ) | ||||||
|  | 
 | ||||||
|  | @REM rem 等待 CHECK_INTERVAL 秒后再次检查 | ||||||
|  | @REM timeout /T %CHECK_INTERVAL% >nul | ||||||
|  | @REM goto LOOP | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | :start | ||||||
|  | start /wait C:\Python39\python.exe C:\path\to\twitter\twitter.py | ||||||
|  | echo script dead... restarting | ||||||
|  | goto start | ||||||
					Loading…
					
					
				
		Reference in new issue