diff --git a/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs b/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs index a9f3169..a5bb8e2 100644 --- a/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs +++ b/packages/geek-auto-start-chat-with-boss/combineCalculator.mjs @@ -153,6 +153,14 @@ export function formatStaticCombineFilters(rawStaticCombineRecommendJobFilterCon industryList: condition.industry ? [condition.industry] : [] } }) - result.unshift(null) + if (!result.length) { + result.push({ + salaryList: [], + experienceList: [], + degreeList: [], + scaleList: [], + industryList: [] + }) + } return result } diff --git a/packages/geek-auto-start-chat-with-boss/index.mjs b/packages/geek-auto-start-chat-with-boss/index.mjs index 144b9f1..5aaee7a 100644 --- a/packages/geek-auto-start-chat-with-boss/index.mjs +++ b/packages/geek-auto-start-chat-with-boss/index.mjs @@ -535,10 +535,11 @@ async function toRecommendPage (hooks) { }).then((res) => { return res.json() }) - await Promise.all([ - page.goto(recommendJobPageUrl, { timeout: 120 * 1000 }), - page.waitForNavigation(), - ]) + page.goto(recommendJobPageUrl, { timeout: 1 * 1000 }).catch(e => { void e }) + await sleep(3000) + await page.waitForFunction(() => { + return document.readyState === 'complete' + }, { timeout: 120 * 1000 }) if ( page.url().startsWith('https://www.zhipin.com/web/common/403.html') || page.url().startsWith('https://www.zhipin.com/web/common/error.html')