10000 GitHub - 845415120/RSSWorker: 运行在Cloudflare Worker上的RSS订阅生成器
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

运行在Cloudflare Worker上的RSS订阅生成器

License

Notifications You must be signed in to change notification settings

845415120/RSSWorker

 
 

Repository files navigation

RSSWorker

RSSWorker 是一个轻量级的 RSS 订阅工具,可以部署在 Cloudflare Worker 上。

支持

注:以下路由均在 [域名]/rss/ 下,如 https://example.com/rss/bilibili/user/dynamic/1

  • bilibili 动态 (/bilibili/user/dynamic/:uid)
  • telegram 频道 (/telegram/channel/:username)
  • weibo 用户 (/weibo/user/:uid)
  • 小红书用户 (/xiaohongshu/user/:uid)

部署

Deploy to Cloudflare Workers

开发

src/lib/[网站名称]/[功能] 参照已有的 demo 添加脚本,然后在 src/route.js 中添加插件即可。

注意事项:

  1. Cloudflare Worker 有最大打包体积限制(免费用户 1 MB,付费用户 10 MB),所以插件需要尽量轻量化。如使用 fetch 进行请求、使用 Cloudflare Worker 提供的 HTMLRewriter 进行 HTML 解析等。

模板引擎使用的格式为:

let items = [
 {
  title: 'Bilibili User Dynamic',
  link: `https://space.bilibili.com/${uid}/dynamic`,
  description: 'Bilibili User Dynamic233',
  pubDate: new Date().toUTCString(),
  guid: `https://space.bilibili.com/${uid}/dynamic`,
  author: 'bilibili@bilibili.com',
  category: 'video',
  comments: `https://space.bilibili.com/${uid}/dynamic`,
  enclosure: {
   url: 'https://www.bilibili.com/favicon.ico',
   type: 'image/x-icon',
   length: 0,
  },
  source: {
   title: 'Bilibili',
   url: 'https://www.bilibili.com',
  },
 },
];
let data = {
    title: `bilibili 动态`,
    link: `https://space.bilibili.com/${uid}/dynamic`,
    description: `${globalUsername} 的 bilibili 动态`,
    language: 'zh-cn',
    category: 'bilibili',
    items: items,
};

致谢

  • RSSHub 灵感和部分代码来源

About

运行在Cloudflare Worker上的RSS订阅生成器

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0