Step-by-Step Guide to Configuring Parameters for xhs_ai_publisher
xhs_ai_publisher
Project Overview
xhs_ai_publisher
is an automation tool specifically designed for publishing articles on the Xiaohongshu platform. This project combines a graphical user interface with automation scripts, leveraging large model technology to generate content. It automates browser login and article publishing, aiming to simplify the content creation and publishing process.
Features
- User Login: Log into the Xiaohongshu account using a phone number, with support for automatic saving and loading of login credentials.
- Content Generation: Automatically generate article titles and content using large model technology.
- Image Management: Automatically download and preview cover images and content images.
- Article Preview and Publishing: Preview the generated article in the browser and publish it directly.
Main Modules
easy_ui.py
This module uses tkinter
to build a graphical user interface with the following features:
- Login Interface: Enter your phone number to log in.
- Content Input: Input custom content to trigger content generation.
- Content Generation: Call backend APIs to generate article titles and content and download associated images.
- Image Preview: Display the generated cover and content images.
- Article Preview and Publishing: Preview the generated articles in the browser and publish them.
write_xiaohongshu.py
This module uses selenium
to perform automated operations on the Xiaohongshu platform, including:
- Login Functionality: Automatically complete the login process, with support for saving sessions using cookies.
- Article Publishing: Automatically fill in article titles and content, upload images, and complete the publishing process.
xiaohongshu_img.py
This module handles interactions with the large model interface, generating article titles and content, and retrieving URLs for relevant images.
Installation and Usage
Install Dependencies
Ensure that
Python 3.12
is installed, then run:pip install -r requirements.txt
- Configure Parameters
Modify the login phone number and other configuration options in write_xiaohongshu.py.
Run the Program
Launch the user interface:
python easy_ui.py
Usage Workflow
- After launching the program, enter your phone number to log into your Xiaohongshu account.
- Input keywords or descriptions for the content you want to generate, then click "Generate Content."
- The program will automatically generate article titles and content and download relevant images.
- Preview the generated content and images, confirm their accuracy, and click "Preview and Publish" to publish the article.
Notes
- Ensure that the Chrome browser is installed and download the corresponding version of ChromeDriver.
- You will need to enter a verification code during the login process, so ensure your phone is accessible.
- Before publishing articles, verify the generated content and images to ensure they meet the platform's publishing requirements.
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »