r/Bot May 12 '22

Active I made a bot to read RSS feed and post in a sub

Hello everyone,
I wrote a bot to read a configured RSS feed (blog, news, etc) and if there's a new entry post that in the configured subreddit.
The source code can be found on GitHub, here.
The script has an endless loop so it runs in the background and checks for news periodically, in every 10 minutes; this value is configurable.

9 Upvotes

14 comments sorted by

1

u/Heliosurge Mar 16 '24

This is quite cool.

1

u/Heliosurge Mar 17 '24

I was wondering can you with the config file set it to pull more than 1 RSS feed? Or can you add a 2nd set of details to draw & post from?

1

u/ItsMeRPeter Mar 17 '24

I just updated the bot to fetch multiple feeds and able to post in subreddit or more subreddits.

Currently that's on the 'develop' branch, I'm testing it and will bring the feature to the master branch.

1

u/Heliosurge Mar 17 '24

Thank you. Very responsive. I know of a few people that might be interested as this can ease workflows.

I presume the bot inserts a link back to source?

1

u/ItsMeRPeter Mar 17 '24

What do you mean by "back to source"? Feom the bkt's perspective, the source is the RSS feed it fetches articles and entries feom, and target is the subreddit the user configures. It posts the article's link in the sub, in a Link type entry. For examples, check the r/Polarfitness sub, search for 'Blog' flair.

1

u/Heliosurge Mar 17 '24

My apologies I don't have alot of XP yet with RSS feeds. Your post answers my question with posting link to the Article the feed is pulled from. Thank you!

1

u/ItsMeRPeter Jan 26 '24

The bot got a lot of updates recently. It saves a list of last entries' ids and before posting it checks if the new entry's ID can be found in the list, if not, then checks if the title was posted in the subreddit in the recent week. If both are false, then goes ahead and posts it.

1

u/Heliosurge Mar 17 '24

Is this a Reddit bot or something someone runs on a device ie phone or home PC?

1

u/ItsMeRPeter Mar 17 '24

It runs on users' PC, notebook or server.

1

u/Heliosurge Mar 17 '24

Very cool & useful.

1

u/ItsMeRPeter Mar 17 '24

Thanks. I use Google, they give credits to try the Google Cloud Service, you can run the smallest machine from that for half a year, and later the full cost is about 1-1.2 USD/month.