Skip to content

francgossin/xhsfeedbot

Repository files navigation

xhsfeedbot

A bot that forward REDNote to Telegram Message or Telegraph

Require: Python 3.13

Require: mitmproxy 12.1.2 Require: python-telegram-bot 22.4 Require: telegraph 2.2.0 Require: Flask 3.1.2 Require: pytz 2025.2 Require: python-dotenv 1.1.1 Require: requests 2.32.5 Require: paramiko 4.0.0

xhsfeed Bot

Requirements

  1. Server side: Python 3.13 or newer on Linux, macOS or Windows.

  2. Device side: A rooted Android device or emulator, or jailbroken iOS device, with REDNote app installed.

  3. Both server and device must be in the same network, and server side should has stable access to Telegram and Telegraph server.

How it works

Deployment guide

Server side

Download platform-tools and add adb to PATH if you are using an Android device.

git clone https://github.com/francgossin/xhsfeedbot.git
cd xhsfeedbot
mkdir -p data
mkdir -p log
python3.13 -m venv .venv

Create a .env file with your own configuration.

BOT_TOKEN='Telegram Bot Token'
ADMIN_ID='Bot Owner Telegram ID'

# 0: Android with root; 1: Jailbroken iOS
TARGET_DEVICE_TYPE=1

# ssh information necessary if your target device type is jailbroken iOS
SSH_IP=127.0.0.1 # device IP address
SSH_PORT=22 # device ssh port, defaut 22
SSH_USERNAME=root
SSH_PASSWORD=alpine
# Default user name and password for jailbroken iOS. You may have to configure your own.

Open three terminal windows or use screen, start all three scripts.

source .venv/bin/activate
# export https_proxy if necessary.
python xhsfeedbot.py
source .venv/bin/activate
python mitm_server.py
source .venv/bin/activate
python shared_server.py

Device side

Start mitm_server.py and set device proxy on Wi-Fi settings.

Host: server side IP address.

Port: mitm server's port number.

Open mitm.it on device browser and follow the corresponding guide.

iOS devices

Check ios.cfw.guide to jailbreak your iOS device.

Then install OpenSSH through APT package manager for jailbroken iOS like Cydia or Sileo.

Android devices

Guide of Android Emulator

If you are not using an emulator, you need to root your device and then manually move CA certificate to system partition, or use Magisk method, and then reboot.

About

A bot that forward REDNote to Telegram Message or Telegraph

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages