mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 17:09:07 +08:00
migrate cookie length condition out to shell from core
This commit is contained in:
@@ -20,11 +20,6 @@ const { cookies: bossCookies } = readConfigFile('boss.json')
|
|||||||
|
|
||||||
const targetCompanyList = readConfigFile('target-company-list.json')
|
const targetCompanyList = readConfigFile('target-company-list.json')
|
||||||
|
|
||||||
if (!bossCookies?.length) {
|
|
||||||
console.error('There is no cookies. you can save a copy with EditThisCookie extension.')
|
|
||||||
process.exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
const recommendJobPageUrl = `https://www.zhipin.com/web/geek/job-recommend`
|
const recommendJobPageUrl = `https://www.zhipin.com/web/geek/job-recommend`
|
||||||
|
|
||||||
const expectCompanySet = new Set(targetCompanyList)
|
const expectCompanySet = new Set(targetCompanyList)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import path from 'node:path'
|
|||||||
import { get__dirname } from '@bossgeekgo/utils/legacy-path.mjs';
|
import { get__dirname } from '@bossgeekgo/utils/legacy-path.mjs';
|
||||||
import JSON5 from 'json5'
|
import JSON5 from 'json5'
|
||||||
import { readConfigFile } from '@bossgeekgo/geek-auto-start-chat-with-boss/runtime-file-utils.mjs'
|
import { readConfigFile } from '@bossgeekgo/geek-auto-start-chat-with-boss/runtime-file-utils.mjs'
|
||||||
|
const { cookies: bossCookies } = readConfigFile('boss.json')
|
||||||
const { groupRobotAccessToken: dingTalkAccessToken } = readConfigFile('dingtalk.json')
|
const { groupRobotAccessToken: dingTalkAccessToken } = readConfigFile('dingtalk.json')
|
||||||
|
|
||||||
const initPlugins = (hooks) => {
|
const initPlugins = (hooks) => {
|
||||||
@@ -17,6 +17,10 @@ const initPlugins = (hooks) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
;(async () => {
|
;(async () => {
|
||||||
|
if (!bossCookies?.length) {
|
||||||
|
console.error('There is no cookies. You can save a copy with EditThisCookie extension.')
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
const hooks = {
|
const hooks = {
|
||||||
puppeteerLaunched: new SyncHook(),
|
puppeteerLaunched: new SyncHook(),
|
||||||
pageLoaded: new SyncHook(),
|
pageLoaded: new SyncHook(),
|
||||||
|
|||||||
Reference in New Issue
Block a user