NOTE: Code generated by ChatGPT on 2026-02-07.

  • Fetches that RSS feed
  • Parses post links from it
  • Downloads each link using wget
  • Runs once per hour in a loop

Required dependacy: pip install feedparser

import time
import subprocess
import feedparser

RSS_URL = "https://lemmy.ml/feeds/c/archive.xml?sort=New"
CHECK_INTERVAL = 3600  # seconds = 1 hour

seen_links = set()

def fetch_and_download():
    feed = feedparser.parse(RSS_URL)

    for entry in feed.entries:
        link = entry.get("link")
        if not link:
            continue

        if link not in seen_links:
            print(f"Downloading: {link}")
            subprocess.run(["wget", link])
            seen_links.add(link)

if __name__ == "__main__":
    while True:
        try:
            fetch_and_download()
        except Exception as e:
            print("Error:", e)

        print("Sleeping for 1 hour...\n")
        time.sleep(CHECK_INTERVAL)
Edit

Pub: 07 Feb 2026 20:41 UTC

Views: 8

Auto Theme: Dark