import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{t as r}from"./timezone-keeL11Io.mjs";import{load as i}from"cheerio";const a={path:`/ci-en/:id/article`,categories:[`anime`],view:0,example:`/dlsite/ci-en/7400/article`,parameters:{id:`Creator id, can be found in URL`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1,nsfw:!0},radar:[{source:[`ci-en.dlsite.com/creator/:id/article/843558`,`ci-en.dlsite.com/`]}],name:`Ci-en Creators' Article`,maintainers:[`nczitzk`],handler:o};async function o(a){let o=a.req.param(`id`)??`7400`,s=a.req.query(`limit`)?Number.parseInt(a.req.query(`limit`)):10,c=`https://ci-en.dlsite.com/creator/${o}/article?mode=list`,l=i((await n({method:`get`,url:c})).data),u=l(`.c-postedArticle-info a`).slice(0,s).toArray().map(e=>(e=l(e),{title:e.text(),link:e.attr(`href`)}));return u=await Promise.all(u.map(a=>e.tryGet(a.link,async()=>{let e=i((await n({method:`get`,url:a.link})).data);return e(`.article-title`).remove(),e(`.file-player-image`).each(function(){e(this).replaceWith(`<img src="${e(this).attr(`data-actual`)}">`)}),a.description=e(`article`).html(),a.pubDate=r(t(e(`.e-date`).first().text()),9),a.category=e(`.c-hashTagList-item`).toArray().map(t=>e(t).text().split(`#`).pop().trim()),a}))),{title:l(`title`).text(),link:c,item:u}}export{a as route};