diff options
Diffstat (limited to 'sh/dyafk')
-rwxr-xr-x | sh/dyafk | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -10,7 +10,11 @@ while :; do firefox --headless --profile "$HOME/.mozilla/firefox/dyafk" https://www.douyu.com/9640128 & fi else - kill $(pidof firefox) + if pidof -q firefox; then + kill $(pidof firefox) 2>/dev/null + # for logging, so I know when firefox killed, which also need that `if pidof -q firefox` + echo 'kill firefox' + fi fi # open.douyu.com AUP for api request seems very high, about 6k/min per api? see https://open.douyu.com/source/api/5 # although I don't use open.douyu.com api but can be used as a reference, so I think 1 request per minute is ok |