Fix warnings, LinkedIn selector update, Telegram notify listing, usajobs title filter
- LinkedIn: new URL with geoId, updated selectors to li[data-occludable-job-id], scroll adapter, pagination disabled - usajobs: add include_title_keywords post-filter (dentist/orthodontist/orthodontic) - aroragroup: fix AJAX load via doloadJBSearchList(), fix container selector - govtjobs/srpmic: clear result_list_wait_selector to avoid 15s timeout on 0-result pages - orchestrator: wait selector timeout WARNING → DEBUG - extractor: no-container WARNING → DEBUG - notifier: provider-based dispatch (telegram/kakaotalk), build_listing_messages() for Telegram - cli notify: send job listing with links instead of Ollama summary - global.yaml: provider set to telegram Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
22a0c6dbdc
commit
89ca7a4006
@ -0,0 +1,34 @@
|
|||||||
|
"""LinkedIn Jobs adapter — scroll to load all cards on first page only."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from loguru import logger
|
||||||
|
|
||||||
|
from gimme_job.adapters.base import ManifestDrivenAdapter
|
||||||
|
from gimme_job.adapters.registry import register
|
||||||
|
from gimme_job.models.dto import JobPostingCandidate, RawJobCard
|
||||||
|
|
||||||
|
|
||||||
|
@register("linkedin")
|
||||||
|
class LinkedInAdapter(ManifestDrivenAdapter):
|
||||||
|
|
||||||
|
def collect_cards(self, page, manifest) -> list[RawJobCard]:
|
||||||
|
"""Scroll each card into view to trigger lazy-loading, then extract."""
|
||||||
|
self._scroll_to_load(page)
|
||||||
|
return super().collect_cards(page, manifest)
|
||||||
|
|
||||||
|
def normalize(self, raw: RawJobCard) -> JobPostingCandidate:
|
||||||
|
return super().normalize(raw)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _scroll_to_load(page) -> None:
|
||||||
|
"""Scroll each job card into view to force LinkedIn's virtual list to render."""
|
||||||
|
try:
|
||||||
|
page.evaluate("""() => {
|
||||||
|
const cards = Array.from(document.querySelectorAll('li[data-occludable-job-id]'));
|
||||||
|
cards.forEach(card => card.scrollIntoView({ behavior: 'instant', block: 'center' }));
|
||||||
|
}""")
|
||||||
|
page.wait_for_timeout(800)
|
||||||
|
page.evaluate("window.scrollTo(0, 0)")
|
||||||
|
page.wait_for_timeout(400)
|
||||||
|
except Exception as e:
|
||||||
|
logger.debug(f"[linkedin] scroll_to_load failed: {e}")
|
||||||
Loading…
Reference in New Issue