mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-06-03 14:40:49 +08:00
Merge remote-tracking branch 'origin/feature/ui' into feature/multi-process
This commit is contained in:
@@ -28,7 +28,7 @@ import {
|
||||
RECHAT_LLM_FALLBACK
|
||||
} from '../../../common/enums/auto-start-chat'
|
||||
import gtag from '../../utils/gtag'
|
||||
import { JobHireStatus } from '@geekgeekrun/sqlite-plugin/dist/enums';
|
||||
import { JobHireStatus } from '@geekgeekrun/sqlite-plugin/dist/enums'
|
||||
import dayjs from 'dayjs'
|
||||
import cheerio from 'cheerio'
|
||||
import { connectToDaemon, sendToDaemon } from '../OPEN_SETTING_WINDOW/connect-to-daemon'
|
||||
@@ -177,16 +177,24 @@ async function checkJobIsClosed() {
|
||||
}
|
||||
positionNameElHandle.click()
|
||||
try {
|
||||
const targetPage = await waitForPage(pageMapByName.boss!.browser(), async (page) => {
|
||||
const url = page.url()
|
||||
if (
|
||||
url.startsWith(`https://www.zhipin.com/job_detail/${encryptJobId}`) &&
|
||||
(await page.evaluate(() => document.readyState === 'complete'))
|
||||
) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
const targetPage = await waitForPage(
|
||||
pageMapByName.boss!.browser(),
|
||||
async (page) => {
|
||||
const url = page.url()
|
||||
if (
|
||||
url.startsWith(`https://www.zhipin.com/job_detail/${encryptJobId}`) &&
|
||||
(await page.evaluate(
|
||||
() =>
|
||||
!!document.querySelector('#main .job-banner') ||
|
||||
!!document.documentElement.innerText?.includes(`您访问的页面不存在`)
|
||||
))
|
||||
) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
{ timeout: 15 * 1000 }
|
||||
)
|
||||
const htmlContent = await targetPage.content()
|
||||
if (htmlContent) {
|
||||
const $ = cheerio.load(htmlContent)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>GeekBossGo</title>
|
||||
<title>GeekGeekRun 牛人快跑</title>
|
||||
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
|
||||
Reference in New Issue
Block a user