Auto-deploy: 2026-08-06 00:07:54
This commit is contained in:
+26
-3
@@ -970,7 +970,7 @@
|
||||
}
|
||||
|
||||
async function scanJobList() {
|
||||
const listItems = document.querySelectorAll('.jobs-search-results__list-item, .job-card-container');
|
||||
const listItems = document.querySelectorAll('.jobs-search-results__list-item, .job-card-container, [componentkey^="job-card-component-ref"], [data-job-id]');
|
||||
if (!listItems.length) {
|
||||
alert('No job items found on this page. Scroll down to load them.');
|
||||
return;
|
||||
@@ -978,13 +978,36 @@
|
||||
|
||||
const jobsToScan = [];
|
||||
listItems.forEach((item, index) => {
|
||||
let title = '';
|
||||
let company = '';
|
||||
|
||||
const titleEl = item.querySelector('.job-card-list__title, .artdeco-entity-lockup__title');
|
||||
const companyEl = item.querySelector('.job-card-container__primary-description, .artdeco-entity-lockup__subtitle');
|
||||
|
||||
if (titleEl && companyEl) {
|
||||
title = titleEl.textContent;
|
||||
company = companyEl.textContent;
|
||||
} else {
|
||||
// Fallback for obfuscated classes: use innerText
|
||||
const textContent = item.innerText || '';
|
||||
const lines = textContent.split('\n')
|
||||
.map(t => t.trim())
|
||||
.filter(t => t.length > 0 && !t.includes('promoted jobs are ranked') && !t.includes('Actively reviewing'));
|
||||
|
||||
let startIndex = 0;
|
||||
if (lines[0] === 'Promoted') startIndex = 1;
|
||||
|
||||
if (lines.length >= startIndex + 2) {
|
||||
title = lines[startIndex].replace(/\(Verified job\)/i, '').trim();
|
||||
company = lines[startIndex + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if (title && company) {
|
||||
jobsToScan.push({
|
||||
index: index,
|
||||
title: titleEl.textContent.trim().replace(/\n/g, ''),
|
||||
company: companyEl.textContent.trim().replace(/\n/g, ''),
|
||||
title: title.replace(/\n/g, ''),
|
||||
company: company.replace(/\n/g, ''),
|
||||
element: item
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user