linkedin / by UGK Official

Linkedin Search

给定 keyword 和时间意图,dispatcher 把时间归并到 LinkedIn 原生三档(past-24h/past-week/past-month),worker 用 UGK 管理的 chrome_cdp 搜索 LinkedIn 内容(按最新排序 + 时间档位过滤),把完整结构化结果写入 $TASK_OUTPUT_DIR/linkedin_search_results.json。headless 友好,并行安全。

Install

ugk task install linkedin-search

This task installs 9 files from the official manifest, including 4 script files.

Runtime input

keywordLinkedIn search keyword. Used verbatim in the LinkedIn content search query URL. Do not add operators unless explicitly included by the user.
timePhraseThe user's original time phrase, preserved verbatim. Any language. e.g. 最近一天, 最近一周, 过去一个月, past 24 hours, last week. Just echo what the user said about time.
dateRangeLinkedIn native date filter tier. One of exactly three values: 'past-24h' (last 24 hours), 'past-week' (last 7 days), 'past-month' (last 30 days). You are an LLM, so MAP the user's time phrase to the nearest tier that COVERS it (never pick a tier shorter than the user's intent, or results get missed). Rules: any phrase <=24h ('today','recent','今天','最近几小时','past 24h') → 'past-24h'; >24h and <=7d ('最近三天','上周','past few days','last week') → 'past-week'; >7d ('一个月','最近两周','past month','90 days' → round UP to the tier that covers it, so 90 days → 'past-month'). LinkedIn only supports these 3 tiers natively — do not invent others. Default 'past-week' if user is vague about duration.

Acceptance

check$TASK_OUTPUT_DIR/linkedin_search_results.json 存在且可被 JSON.parse。
check输出 JSON 至少含 platform, keyword, retrievedAt, queryUrl, timeWindow, benchmark, results 字段;results 为数组。
checktimeWindow 是对象,含 dateRange, timePhrase 字段;dateRange 是 past-24h/past-week/past-month 之一。
checkresults 非空时,每条至少含 postedAtLabel, content, url, authorHandle 字段之一,且含 authorName 或 authorHandle 之一。
checkcontent 字段保留原文(不截断,或保留 collectVisiblePosts 的 cleanCardText 完整结果)。
checkbenchmark 是对象,含 stopReason, scrollRounds, totalDiscovered, buttonClicks, inWindow 字段。
checkresults 条数与 benchmark.inWindow 一致(全量落地,不丢),除非遇到 login_required(此时 results 为空且 benchmark.stopReason=login_required)。
checkqueryUrl 是 LinkedIn 内容搜索 URL,含 sortBy 和 datePosted 两个参数(由 build-url.mjs 生成)。