import{t as e}from"./logger-B0fjfmRH.mjs";import{n as t}from"./playwright-1-2p8zlN.mjs";import{o as n,s as r,t as i}from"./utils-Cw2HTKe2.mjs";import{load as a}from"cheerio";const o={path:`/company/:company_id/posts`,categories:[`social-media`],example:`/linkedin/company/google/posts`,parameters:{company_id:`Company's LinkedIn profile ID`},description:`Get company's LinkedIn posts by company ID`,features:{requireConfig:!1,requirePuppeteer:!0,antiCrawler:!1,supportRadar:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`Company Posts`,maintainers:[`saifazmi`],handler:async o=>{let s=o.req.param(`company_id`),c=await t(),l=await c.newPage();await l.setRequestInterception(!0),l.on(`request`,e=>{e.resourceType()===`document`?e.continue():e.abort()});let u=new URL(`${i}/company/${s}`);e.http(`Requesting ${u.href}`),await l.goto(u.href,{waitUntil:`domcontentloaded`});let d=await l.content();await l.close();let f=a(d),p=n(f),m=r(f);return await c.close(),{title:`LinkedIn - ${p}'s Posts`,link:u.href,description:`This feed gets ${p}'s posts from LinkedIn`,item:m.map(e=>({title:e.text,description:e.text,link:e.link,pubDate:e.date,updated:e.date}))}}};export{o as route};