A bot that forward REDNote to Telegram Message or Telegraph
-
Server side: Python 3.13 or newer on Linux, macOS or Windows.
-
Device side: A rooted Android device or emulator, or jailbroken iOS device, with REDNote app installed.
-
Both server and device must be in the same network, and server side should has stable access to Telegram and Telegraph server.
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 .venvCreate 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.pysource .venv/bin/activate
python mitm_server.pysource .venv/bin/activate
python shared_server.pyStart 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.
Check ios.cfw.guide to jailbreak your iOS device.
Then install OpenSSH through APT package manager for jailbroken iOS like Cydia or Sileo.
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.

