Build your own stream with RSSHub

Original link: https://justgoidea.com/2023-054

notion image
Due to the restrictions of GFW, a large number of websites cannot be accessed normally in mainland China. This results in many users having to use proxy tools to surf the Internet. However, if you don’t have these tools at your fingertips at some point, how do you access and view the content of websites blocked by the GFW? RSSHub provides an elegant solution.
RSSHub is an open source project led by DIYgod . It can convert various website content into RSS format, covering a wide range of sites, including news sites, social media platforms, e-commerce sites, and more. Through RSSHub, users can use RSS readers to obtain the latest updates of major websites without directly accessing these websites, realizing efficient and convenient network information reception.
With the development of serverless technology, deploying RSSHub has become very simple. The official website alone provides ten methods. Next, I will introduce you to three ways of deploying through Zeabur, deploying through Vercel and deploying through Docker from easy to difficult.

Preparation Phase

Because RSSHub is an open source project hosted on GitHub, no matter which method you use, you need to have a Github account before deployment.
First, open the GitHub official website with a browser (if the page cannot be opened, please open the proxy tool first and then refresh and try again), then click Sign UP in the upper right corner of the screen to register.
notion image
Next, enter your email address (email), password (password), user name (username), whether to subscribe to product information (fill in y for subscription, fill in n for non-subscription), etc.
notion image
notion image
Next, click Verify for real-person verification (as shown in the figure below, adjust the photo on the right to the direction pointed to by the left picture) to prevent accounts maliciously registered by robots.
notion image
After completing the above steps, the account registration steps are completed.
notion image
Then, you need to find the verification code in your mailbox for mailbox verification.
notion image
After the email verification is passed, it means that you have completed the registration. However, you also need to tell GitHub some information to create a charging plan, such as whether you use it personally or in a team, and whether you are a student or a teacher. Choose according to your real situation.
notion image
After that, you will come to the page of the paid plan, where you can choose the free plan.
notion image
At this point, your GitHub account is registered.

Deploy RSSHub via Zeabur

Zeabur is a platform developed by Chinese developers that can help you deploy services. No matter what programming language or development framework you use, you only need to deploy with a few simple buttons.
When used to deploy RSSHub, use Zeabur’s free plan.
First, use your Github account to log in without password on Zeabur’s login page .
notion image
After logging in, there will be a red reminder marked 7 days in the upper right corner of the screen. After clicking, you can see the following page:
notion image
After clicking绑定付款方式, the page will automatically jump to the payment information page. You can bind a credit card, or you can choose没有信用卡, and then bind Alipay.
notion image
notion image
The next step is to click Deploy to Zeabur , your browser will automatically jump to the Zeabur deployment page, click Deploy to deploy.
notion image
After the deployment is successful, you will see the page shown in the figure, indicating that your RSSHub project has been deployed in Zeabur.
notion image
Click the project, enter the management page, and select the domain name. If you have a domain name, you can click自定义to add your own domain name, and then go to the DNS service provider you use to modify the DNS; if you do not have a domain name, click生成域名, and Zeabur will automatically generate a domain name for your project.
notion image
No matter which domain name method you use, you can open the domain name in a new tab page of the browser. If the following page is displayed, it means that you have successfully deployed RSSHub.
notion image
Please note: personal normal use of RSSHub will basically not incur fees, please do not disclose the domain name you deploy, so as to avoid misuse and bring you economic losses.

One-click deployment of RSSHub through Vercel

The deployment method of Vercel is similar to that of Zeabur, the difference is that you can use it normally without filling in any payment information; the deployment method is divided into two methods: one-click deployment without automatic update and manual deployment with automatic update.
The one-click deployment method without automatic update is basically the same as Zeabur. After logging in to Vercel with a GitHub account without password, click One-click deployment to jump to the deployment page.
notion image
Wait for about 1 minute. After the deployment is complete, you will see this page. Click Continue to Dashboard to jump to the background management page.
notion image
On the background management page, you can see that Vercel has automatically generated a URL for you. If you click on this website and the RSSHub page is displayed, it proves that it has been deployed successfully.
notion image
If you want to use a custom domain name, you can add it in the project’s settings.
notion image

Manually deploy RSSHub to Vercel (recommended)

Although one-click deployment without automatic update is very convenient, since the project code of RSSHub is frequently updated, failure to update automatically may lead to some bugs or errors during use.
It is not troublesome to manually deploy RSSHub to Vercel. After the deployment is complete, you only need to synchronize the code of RSSHub in GitHub every once in a while, and Vercel will automatically redeploy, basically without your worry.
First, open RSSHub’s code repository in GitHub.
Then click Starred to bookmark this code warehouse, and then click Fork to create a code branch to your account.
notion image
notion image
After that, you will see the forked code in your own account.
Then install the Pull application in GitHub, click install , and it will be installed automatically. This app will help you to update your code automatically on a regular basis.
notion image
Next, open Vercel, choose Add New , and then choose Project .
notion image
Select the RSSHub code you just forked, and select import . The remaining steps are the same as the previous one-click deployment.
notion image

Deploy RSSHub via Docker

Deploying RSSHub through Docker means that you need to have a VPS, or a computer that is turned on all year round. Here, I take the VPS with Ubuntu system installed as an example.
Note: Due to the need for filing, it is not recommended to use a VPS in mainland China. If you choose cloud servers or lightweight application servers in Alibaba Cloud and Tencent Cloud, please choose Hong Kong or foreign ones.
The first is to log into your VPS via SSH:
Then update the package list:
Next is to install some required packages for APT to be able to download over HTTPS:
Add Docker’s official GPG key:
Set up a stable repository:
Update the apt package index and install the latest versions of Docker Engine and containerd:
Verify that Docker was successfully installed:
Let’s start installing RSSHub, first run the command to pull the Docker image of RSSHub on the VPS:
Then, run RSSHub:
At this point, you can open http://VPS_IP:1200 in the tab page, and if the RSSHub page is displayed, the deployment is successful.
notion image
Next, you can set up a reverse proxy and add a domain name to it.
First install Nginx:
Next is to create a new Nginx configuration file. For example, if your domain name is yourdomain.com , you can create a file called yourdomain.com :
Add the following to this file:
After saving and closing the file, create a symlink to the sites-enabled directory to enable the site:
Test the Nginx configuration file for syntax errors:
Reload Nginx to apply the new configuration:
Now, RSSHub’s Docker service can be accessed through your domain name. However, at this time, your website has not added an SSL certificate, so you cannot use https URL links. How to add an SSL certificate is left for you to explore (RSSHub’s service does not use https is fine).

How to use RSSHub

In the official documentation of RSSHub, there are already many routes that have been made, and you only need to fill in the parameters according to the instructions.
Take the Singapore Lianhe Zaobao subscribed through RSSHub as an example to illustrate the routing parameters of RSSHub.
Use RSSHub to grab the RSS address of Lianhe Zaobao news content: https://rsshub.app/zaobao/znews/china .
Among them, https://rsshub.app corresponds to your RSSHub address, which is the domain name you added yourself or the domain name automatically generated by Vercel/Zeabur mentioned in the deployment tutorial above.
And /zaobao/znews/ is the route, that is, what is the main content of this website that needs to be captured, and here is to capture news.
So what news to grab? The parameter china means to capture Chinese news. Other parameters also include singapore corresponding to Singapore news, sea corresponding to Southeast Asian news, world corresponding to global news, and sports corresponding to sports news.
Well, now I know that my RSSHub address is https://rssh-ub-test-three.vercel.app , if I want RSSHub to help me fetch sports news from Lianhe Zaobao, how should I write the subscription address? That is written as https://rssh-ub-test-three.vercel.app/zaobao/znews/sports .
If I want to subscribe to Elon Mask’s Twitter timeline, every time Elon Mask tweets, I can see it in my RSS reader. This subscription address is https://rssh-ub-test-three.vercel.app/twitter/user/elonmusk .
If I only want to see Elon Mask’s original tweets and retweets, but not his replies on the timeline, I need to add parameters and write the subscription address as https://rssh-ub-test-three.vercel.app/twitter/user/elonmusk/excludeReplies=1 .

Create stream list with RSSHub

Through RSSHub, you can easily and quickly build your own customized RSS feed.
RSSHub supports subscription to a variety of information sources including news websites, Twitter, YouTube channels, Telegram channels, UP owners of station B, Weibo, Xiaohongshu, and even weather warnings, earthquake quick reports, software update reminders, Damai.com ticketing Useful information such as updates and McDonald’s event information. Whether it’s news, videos, or daily life’s clothing, food, housing, and transportation, the subscription address generated by RSSHub can help you obtain comprehensive information conveniently in the RSS reader. With RSSHub, you can receive all kinds of latest information in one stop, making information acquisition more efficient.
Then, we can imagine an idealized RSS information flow list, most of the subscription addresses are generated by RSSHub, it is like this:
  • ? news
    • China News
    • international News
    • Other news segments
  • ⚠ early warning
    • weather
    • earthquake
  • ? social contact
    • twitter
    • Weibo
    • immediately
    • Telegram Channel
  • ? read
    • blog
    • Other reading subdivisions
  • ? video
    • youtube
    • Bilibili
  • ? Shopping
    • Jingdong
    • what is worth buying
    • little red book
    • barley net
    • McDonald’s
    • Catch more fish
  • ? entertainment
    • live streaming
    • short video
    • picture
    • game
  • ? Software update

read recommendation

This article is transferred from: https://justgoidea.com/2023-054
This site is only for collection, and the copyright belongs to the original author.