PageSourceSearch

https://rsshub.netlify.app/assets/js/6476eba6.2318a519.js

js rsshub.netlify.app collected 2026-10-03 11:22:06 UTC 7,058 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4827],{6681:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var t=s(1527),a=s(4128);const r={},i="Getting Started",o={id:"usage",title:"Getting Started",description:"Generate an RSS Feed",source:"@site/docs/usage.md",sourceDirName:".",slug:"/usage",permalink:"/usage",draft:!1,unlisted:!1,editUrl:"https://github.com/DIYgod/RSSHub/blob/master/website/docs/usage.md",tags:[],version:"current",lastUpdatedBy:"Lumen Yang",lastUpdatedAt:1710518445,formattedLastUpdatedAt:"Mar 15, 2024",frontMatter:{},sidebar:"guideSidebar",previous:{title:"Introduction",permalink:"/"},next:{title:"Public Instances",permalink:"/instances"}},l={},d=[{value:"Generate an RSS Feed",id:"generate-an-rss-feed",level:2},{value:"Contribute a New Route",id:"contribute-a-new-route",level:2},{value:"Use as a npm Package",id:"use-as-a-npm-package",level:2},{value:"Install",id:"install",level:3},{value:"Usage",id:"usage",level:3},{value:"Radar",id:"radar",level:2},{value:"Configuration file",id:"configuration-file",level:3},{value:"Usage",id:"usage-1",level:3}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.a)(),...e.components},{TabItem:s,Tabs:r}=n;return s||h("TabItem",!0),r||h("Tabs",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"getting-started",children:"Getting Started"}),"\n",(0,t.jsx)(n.h2,{id:"generate-an-rss-feed",children:"Generate an RSS Feed"}),"\n",(0,t.jsxs)(n.p,{children:["To subscribe to a Twitter user's timeline, first look at the route document of ",(0,t.jsx)(n.a,{href:"/routes/social-media#twitter-user-timeline",children:"Twitter User Timeline"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"/twitter/user/:id"})," is the route where ",(0,t.jsx)(n.code,{children:":id"})," is the actual Twitter username you need to replace. For instance, ",(0,t.jsx)(n.code,{children:"/twitter/user/DIYgod"})," with a prefix domain name will give you the timeline of Twitter user DIYgod."]}),"\n",(0,t.jsxs)(n.p,{children:["The demo instance will generate an RSS feed at ",(0,t.jsx)(n.code,{children:"https://rsshub.app/twitter/user/DIYgod"}),", use your own domain name when applicable. This feed should work with all RSS readers conforming to the RSS Standard."]}),"\n",(0,t.jsxs)(n.p,{children:["You can replace the domain name ",(0,t.jsx)(n.code,{children:"https://rsshub.app"})," with your ",(0,t.jsx)(n.a,{href:"/install",children:"self-hosted instance"})," or any ",(0,t.jsx)(n.a,{href:"/instances",children:"public instance"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["RSSHub supports additional parameters such as content filtering and full-text extraction, refer to ",(0,t.jsx)(n.a,{href:"/parameter",children:"Parameters"})," for details."]}),"\n",(0,t.jsx)(n.h2,{id:"contribute-a-new-route",children:"Contribute a New Route"}),"\n",(0,t.jsxs)(n.p,{children:["Our thriving community is the key to RSSHub's success, we invite everyone to join us and ",(0,t.jsx)(n.a,{href:"/joinus/quick-start",children:"contribute new routes"})," for all kinds of interesting sources."]}),"\n",(0,t.jsx)(n.h2,{id:"use-as-a-npm-package",children:"Use as a npm Package"}),"\n",(0,t.jsx)(n.p,{children:"Apart from serving as an information source hub, RSSHub is also made compatible with all Node.js projects as an npm Package."}),"\n",(0,t.jsx)(n.h3,{id:"install",children:"Install"}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)(s,{value:"pnpm",label:"pnpm",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"pnpm add rsshub\n"})})}),(0,t.jsx)(s,{value:"yarn",label:"yarnv1",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"yarn add rsshub\n"})})}),(0,t.jsx)(s,{value:"npm",label:"npm",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"npm install rsshub --save\n"})})})]}),"\n",(0,t.jsx)(n.h3,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:"const RSSHub = require('rsshub');\n\nRSSHub.init({\n    // config\n});\n\nRSSHub.request('/youtube/user/JFlaMusic')\n    .then((data) =>
1 {\n        console.log(data);\n    })\n    .catch((e) => {\n        console.log(e);\n    });\n"})}),"\n",(0,t.jsxs)(n.p,{children:["For supported configs please refer to the ",(0,t.jsx)(n.a,{href:"/install/config",children:"Configuration Section"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"A short example for disabling caching can be written as:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:"{\n    CACHE_TYPE: null,\n}\n"})}),"\n",(0,t.jsx)(n.h2,{id:"radar",children:"Radar"}),"\n",(0,t.jsx)(n.p,{children:"In addition to the two functions of generating RSS and obtaining data, RSSHub also provides a Radar function, which is used to map website addresses to RSSHub addresses."}),"\n",(0,t.jsx)(n.h3,{id:"configuration-file",children:"Configuration file"}),"\n",(0,t.jsxs)(n.p,{children:["Radar has two types of configuration files, one is a full-featured ",(0,t.jsx)(n.a,{href:"https://github.com/DIYgod/RSSHub/blob/gh-pages/build/radar-rules.js",children:"js file"}),", and the other is a simplified ",(0,t.jsx)(n.a,{href:"https://github.com/DIYgod/RSSHub/blob/gh-pages/build/radar-rules.json",children:"json file"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"usage-1",children:"Usage"}),"\n",(0,t.jsx)(n.p,{children:"You need to use supported browser extensions, mobile apps, RSS readers, or other tools to use the Radar feature. Please refer to the documentation of the corresponding tool for specific usage instructions."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Browser extension: ",(0,t.jsx)(n.a,{href:"https://github.com/DIYgod/RSSHub-Radar",children:"RSSHub Radar"})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["iOS app: ",(0,t.jsx)(n.a,{href:"https://github.com/Cay-Zhang/RSSBud",children:"RSSBud"})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Android app: ",(0,t.jsx)(n.a,{href:"https://github.com/LeetaoGoooo/RSSAid",children:"RSSAid"})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"RSS Reader: Coming soon"}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}function h(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},4128:(e,n,s)=>{s.d(n,{Z:()=>o,a:()=>i});var t=s(959);const a={},r=t.createContext(a);function i(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.