<%# index.ejs — RSS Feed Generator (RSS 2.0) Expects: data.vods = [{ id, title, notes, thumbnail, streamDate, magnetLink }] When in doubt, copy https://nyaa.si/?page=rss %> <% response.header("Content-Type", "application/rss+xml"); let rss = ` Futureporn.net VODs https://futureporn.net Dedication to the preservation of lewdtuber history ${new Date().toUTCString()} https://validator.w3.org/feed/docs/rss2.html pocketpages en Futureporn.net https://futureporn.net/images/futureporn-icon.png https://futureporn.net `; for (const vod of data.vods) { const vodId = vod.get('id'); const title = (vod?.get('expand')?.vtubers?.map(v => v.get('displayName')).join(', ')) || vod.get('streamDate'); const vodUrl = `${env('ORIGIN')}/vods/${vodId}`; const pubDate = new Date(vod.get('streamDate')).toUTCString(); const notes = vod.get('notes'); const thumbnail = vod.get('thumbnail'); const magnetLink = vod.get('magnetLink'); // @TODO the must contain a .torrent, NOT a magnetLink. rss += ` <![CDATA[${title}]]> ${vodUrl} ${vodUrl} ${vodUrl} ${pubDate}`; // Description if (notes) { rss += ` ${vodUrl} ${notes}]]>`; } // Thumbnail (custom tag — allowed) if (thumbnail) { rss += ` ${env('ORIGIN')}/api/files/vods/${vodId}/${thumbnail}`; } rss += ` `; } rss += ` `; response.html(200, rss); %>