import{t as e}from"./logger-B0fjfmRH.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./timezone-keeL11Io.mjs";import{n as r}from"./playwright-1-2p8zlN.mjs";import{load as i}from"cheerio";const a=`www.colamanga.com`,o={path:`/:id`,parameters:{id:`漫画id`},name:`Manga`,maintainers:[`machsix`],example:`/colamanga/manga-qq978758`,categories:[`anime`],radar:[{source:[`${a}/:id/`],target:`/:id`}],features:{requireConfig:!1,requirePuppeteer:!0,antiCrawler:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},handler:c};function s(e,t){let n=new Date(e);return n.setDate(n.getDate()+t),n}async function c(o){let c=`https://${a}/${o.req.param(`id`)}`,l=await r(),u=await l.newPage();await u.setRequestInterception(!0),u.on(`request`,e=>{e.resourceType()===`document`?e.continue():e.abort()}),e.http(`Requesting ${c}`),await u.goto(c,{waitUntil:`domcontentloaded`});let d=await u.content();await l.close();let f=i(d),p=f(`meta[property='og:comic:book_name']`).attr(`content`),m=f(`meta[property='og:comic:update_time']`).attr(`content`),h=n(m?t(m):new Date),g=f(`span:contains('作者')`).parent().contents().eq(1).text(),_=f(`.all_data_list >ul>li>a`).toArray().map((e,t)=>({title:`${p} ${f(e).text()}`,link:e.attribs.href,description:f(`.fed-part-esan`).text(),author:g,pubDate:s(h,-7*t)}));return{title:p||`Unknown Manga`,link:c,item:_}}export{o as route};