diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2024-05-05 18:04:31 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2024-05-05 18:04:31 -0700 |
commit | f8bccdfd21c62e662163d99d2dc04984f719c524 (patch) | |
tree | 7b60a2eae8a4c8baecc2329aef528a62a723f2c9 /sh/dyafk | |
parent | 18cbaf310697d7aee38819fa21b2feffb1f7073a (diff) |
dyafk log when firefox killed
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 |