import{t as e}from"./got-BBDj7u1e.mjs";import{i as t,n,r,t as i}from"./utils-D5lx5jD7.mjs";import{load as a}from"cheerio";const o={path:`/highlight/:journal?`,categories:[`journal`],example:`/nature/highlight`,parameters:{journal:"short name for a journal, `nature` by default"},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!0},radar:[{source:[`nature.com/:journal/articles`,`nature.com/:journal`,`nature.com/`],target:`/highlight/:journal`}],name:`Research Highlight`,maintainers:[],handler:s,description:`::: warning
  Only some journals are supported.
:::`};async function s(o){let{journal:s=`nature`}=o.req.param(),c=`${i}/${s}/articles?type=research-highlight`,l=a((await e(c,{cookieJar:n})).data),u=t(l);return u=await Promise.all(u.map(e=>r(e))),{title:l(`title`).text().trim(),description:l(`meta[name=description]`).attr(`content`),link:c,item:u}}export{o as route};