Reddit Content

The Reddit Content cron job monitors selected cybersecurity subreddits for popular posts, discussions, and resources. It helps you stay updated with trending cybersecurity topics, tools, research, and community discussions from Reddit without having to manually check multiple subreddits.

Quick Details

  • Cron Script: sendRedditPosts.js
  • Data Source: Selected cybersecurity subreddits via Reddit API
  • Frequency: Daily (configurable)
  • Command: npm run cron -- -c sendRedditPosts

Functionality

The Reddit Content cron job performs the following operations:

  1. Connects to the Reddit API using your configured credentials
  2. Fetches top posts from your configured cybersecurity subreddits
  3. Filters content based on your configured criteria (upvotes, comments, post types)
  4. Uses AI to summarize longer text posts or technical writeups
  5. Creates a formatted digest message with post summaries and direct links
  6. Sends the digest to your Telegram channel
  7. Tracks which posts have been shared to avoid duplicates

Usage

Reddit API Setup

Before using the Reddit Content cron, you need to set up API access:

  1. Go to https://www.reddit.com/prefs/apps and log in with your Reddit account
  2. Click "create app" or "create another app" at the bottom
  3. Fill in the required fields:
    • Name: Cyber Bot
    • App type: Select "script"
    • Description: Bot for collecting cybersecurity content
    • About URL: (Optional) Your project URL
    • Redirect URI: http://localhost:8080
  4. Click "create app"
  5. Note your client ID (displayed under the app name) and client secret
  6. Add these to your .env file along with your Reddit username and password

Running

To run the Reddit Content cron job manually:

# Get content from configured subreddits
npm run cron -- -c sendRedditPosts