mirror of
https://github.com/hempyhemp/hh-auto-reply.git
synced 2026-06-08 18:04:57 +00:00
🐛 fix(scraper): исправлены селекторы для ввода текста в письмо
Some checks failed
Deploy / deploy (push) Failing after 18s
Some checks failed
Deploy / deploy (push) Failing after 18s
🚀 feat(deploy): добавлены переменные окружения для деплоя
В сообщении обязательно два разных типа, например, fix и feat.
This commit is contained in:
@@ -374,13 +374,19 @@ export async function applyToJobs(
|
||||
if (letter) {
|
||||
await keep(`✅ <b>${escapeHtml(vacancy.title)}</b>\n\n${escapeHtml(letter)}`)
|
||||
|
||||
await page.waitForSelector(
|
||||
'[data-qa="textarea-wrapper"], [data-qa="vacancy-response-popup-form-letter-input"], [data-qa="textarea-native-wrapper"]',
|
||||
{ timeout: 10000 },
|
||||
).catch(() => {})
|
||||
const LETTER_SELECTORS = [
|
||||
'[data-qa="textarea-wrapper"] textarea',
|
||||
'[data-qa="vacancy-response-popup-form-letter-input"]',
|
||||
'[data-qa="textarea-native-wrapper"] textarea',
|
||||
]
|
||||
|
||||
const letterInput = await page.$('[data-qa="textarea-wrapper"] textarea')
|
||||
?? await page.$('[data-qa="vacancy-response-popup-form-letter-input"]') ?? await page.$('[data-qa="textarea-native-wrapper"] textarea')
|
||||
await page.waitForSelector(LETTER_SELECTORS.join(', '), { timeout: 10000 }).catch(() => {})
|
||||
|
||||
let letterInput = null
|
||||
for (const sel of LETTER_SELECTORS) {
|
||||
letterInput = await page.$(sel)
|
||||
if (letterInput) break
|
||||
}
|
||||
await letterInput?.click()
|
||||
await letterInput?.fill(letter, { force: true })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user