From d16ba7ac420c9bcb9957b51be1765fc0e3b29440 Mon Sep 17 00:00:00 2001 From: Recolic Keghart <root@recolic.net> Date: Thu, 7 Dec 2017 00:21:17 +0800 Subject: [PATCH] bug fix. shit api --- daemon.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon.fish b/daemon.fish index 6be0f2c..9134c16 100755 --- a/daemon.fish +++ b/daemon.fish @@ -51,7 +51,7 @@ BEGIN { function _all_answered # This function will return true if no question is opened, so OPENED check is unnecessary. - for class in (cat $_tmp_path | awk $awk_urlfilter | grep 'www.teachermate.com.cn' | sed 's/.*course_id=//g' | sed 's/&open_id=.*//g') + for class in (cat $_tmp_path | awk $awk_urlfilter | grep 'www.teachermate.com.cn' | sed 's/.*course\(_\|\)id=//g' | sed 's/&open\(_\|\)id=.*//g') curl --header "openId: $_openid" "https://www.teachermate.com.cn/wechat-api/v1/questions/$class" > $_tmp_path 2>/dev/null if not grep 'question' $_tmp_path echo "ERROR> curl wechat-api failed. $class $_openid" -- GitLab