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=`https://www.dora-world.com`,o={path:`/article/:topic/:topicId?`,categories:[`anime`],view:0,example:`/dora-world/article/contents`,parameters:{topic:"Topic name, can be found in URL. For example: the topic name of [https://www.dora-world.com/movie](https://www.dora-world.com/movie) is `movie`",topicId:"Topic id, can be found in URL. For example: the topic id of [https://www.dora-world.com/contents?t=197](https://www.dora-world.com/contents?t=197) is `197`"},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.dora-world.com/:topic`]}],name:`Article`,maintainers:[`AChangAZha`],handler:s};async function s(o){let{topic:s,topicId:l=``}=o.req.param(),u=l===``?``:`?t=${l}`,d=`${a}/${s}${u}`,{data:f}=await n(a),p=i(f),m=JSON.parse(p(`script#__NEXT_DATA__`).text()).buildId,{data:h}=await n(`${a}/_next/data/${m}/${s}.json${u}`),g=`${h.pageProps.label_name} - ドラえもんチャンネル`,_=h.pageProps.contents.map(e=>({title:e.title,link:e.page_url.startsWith(`http`)?e.page_url:`${a}${e.page_url}`,description:e.page_url.startsWith(`/contents/`)?``:`<p>${e.title}</p><img src="${e.image_url}" alt="">`,pubDate:r(t(e.publish_at),9),category:e.tags.map(e=>e.name),guid:e.id}));return{title:g,link:d,language:`ja`,image:`https://dora-world.com/assets/images/DORAch_web-touch-icon.png`,item:await Promise.all(_.map(async t=>await e.tryGet(t.link,async()=>(t.description===``&&(t.description=await c(m,t.guid)),t)))).then(e=>e.filter(e=>e!==null))}}async function c(e,t){let{data:r}=await n(`${a}/_next/data/${e}/contents/${t}.json`),o=i(r.pageProps.content.content)(`.main_unit`);return o.find(`.tag`).remove(),o.find(`div[style="display:none"]`).remove(),o.html()?.replaceAll(/<ruby>(.*?)<rt>(.*?)<\/rt><\/ruby>/g,`$1（$2）`)?.replaceAll(/[^\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,``)??``}export{o as route};