Wechat2RssScript
An automated script that automatically extracts WeChat public account article links and converts them into RSS files
statement
- First thanks to Auto.js and AutoX. It is because of the underlying services they provide that this script is possible.
- I am not a full-time freelance developer, I just developed this script after work. Later maintenance and updates may not be timely, please forgive me.
- The platform on which I run this script only has a Nokia X6 backup machine. For other types of mobile phones, some operating parameters can be adjusted in the script. For details, see script parameter configuration. If you still have problems after adjusting the parameters, please collect running logs, screenshots and screen recordings, submit an issue, and I will take the time to follow up. Please do not rush, thank you.
Main functions
- Get the link to the specified public account article and generate an RSS XML file to facilitate RSS client subscription
Functional limitations
- The current script is only applicable to the Android platform. Due to the diversity of Android phones, the script cannot adapt to the unlocking actions of all mobile phones. Therefore, the script only focuses on the function of extracting links to public account articles.
- The current successfully tested WeChat version is 8.0.34
- Due to the limited library functions currently provided by AutoX, the currently generated RSS file only contains links to public account articles and cannot contain full text content. For the full text analysis function, please refer to the expansion ideas.
Installation and use
Preparation
- Download the AutoX APP suitable for your mobile phone from AutoX Release and install it.
- If you need to set up AutoX to run a script regularly, you need to add AutoX to the list that is allowed to run in the background (usually in the battery management configuration menu)
- Turn on accessibility services in AutoX
Script parameter configuration
The parameters can be adjusted according to the specific conditions of the mobile phone.
var interestingUps = [
"drpei" ,
"包邮区" , "渤海小吏" , "饭统戴老板" ,
"集思录" , "老和山下的小学僧" , "卢克文工作室" ,
"兽楼处" , "睡前人间" , "睡前消息编辑部" , "天机奇谈" , "铁头功社" ,
"西西弗评论" , "远川科技评论" , "远川投资评论" , "远川研究所" ] ;
var timeWaitForWakeupMobile = 1000 ;
var timeBeforeBack = 1000 ;
var timeWaitForBack = 2000 ;
var timeWaitForClick = 3000 ;
var longWait = 5000 ;
var shortWait = 500 ;
var onlyNewMessage = false ;
var deleteSubscriberChat = false ;
var targetXmlFilePath = "/sdcard/Wechat2Rss/Wechat2Rss.xml" ;
variable | illustrate |
---|
interestingUps | The name of the public account you follow, used to filter ads |
onlyNewMessage | Control whether to execute the actual function when there is a new official account article |
deleteSubscriberChat | Control whether to delete the official account label after obtaining the link |
targetXmlFilePath | Generate the target address of the RSS XML file |
timeWaitForWakeupMobile | Delay waiting for the phone to wake up |
timeBeforeBack | Waiting delay before performing return operation |
timeWaitForBack | Waiting delay after performing return operation |
timeWaitForClick | Waiting delay after performing click operation |
longWait | long delay |
shortWait | short delay |
Script import and trial run
- Click the "+" button in the upper right corner, click Import, and select the script that needs to be imported.
* After the script is imported successfully, click the triangle icon in the script line to test run
Set up scheduled tasks
If the script is imported and tested successfully, you can set a scheduled task
Note: Generally, when setting up scheduled tasks, you need to solve the screen unlocking problem, or use a backup machine to set it without locking the screen.
Expand ideas
Due to the limitations of AutoX's existing library, it would be troublesome to implement full-text parsing in a script, so a local XML file containing links to official account articles was generated for RSS subscription. The limitations of existing scripts are mainly in two aspects:
- The XML file is a local file on the mobile phone.
- The XML file only contains article links and no full text content.
Solution ideas
- Equipped with a public network cloud host to accept POST requests from mobile phones, parse full text, filter advertisements, and serve RSS full-text files
Contact the author
- The program is independently developed by individuals and has limited capabilities. Some bugs will inevitably occur. Everyone is welcome to report bugs and make optimization suggestions.
- Email: [email protected]
- TG group: https://t.me/+c4OjVlN3pzE0ZmJl
Donate to the author
This program is completely free. If you think this program will be helpful to you, you can donate by scanning the QR code (WeChat) below. Please feel free to make any amount. Thank you for your understanding and support!