GithubHelp home page GithubHelp logo

snquentin / rssworker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yllhwa/rssworker

0.0 0.0 0.0 514 KB

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

License: MIT License

Shell 0.01% JavaScript 99.95% HTML 0.05%

rssworker's Introduction

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: '[email protected]',
		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 灵感和部分代码来源

rssworker's People

Contributors

yllhwa avatar szhu25 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.