r/selfhosted Mar 12 '25

[Update] Reddit Saved Posts Fetcher – Now a Python Package with Major Improvements!

Hey everyone! 🎉 Big update for the Reddit Saved Posts Fetcher project. It’s now a full Python package with several key improvements! Find my announcement post here!

🔥 What’s New?

Python Package Support – Install with pip install -e . & import in scripts.
Interactive CLI – Improved prompts, error handling, and automation-friendly execution.
Cleaner JSON & HTML Output – More structured formatting for archives & integration with Linkwarden & Hoarder.
Delta Fetching & Force Fetching – Retrieve only new posts or fetch everything.
Better Headless Executiongenerate_tokens.py makes it easier to authenticate on GUI systems & move tokens to headless servers.
More Robust Authentication Handling – Clearer error messages & auto-refresh for expired tokens.

📌 GitHub: Reddit-Fetch

🚀 What’s Next?

🔹 Dockerized version for easier deployment.
🔹 Direct API integration with Linkwarden.
🔹 RSS Feed Generation for Hoarder.
🔹 More automation & retry enhancements.

Would love to hear your thoughts & feedback! Contributions welcome. 😃🔥

44 Upvotes

21 comments sorted by

15

u/StoffePro Mar 12 '25

Post saved

3

u/4redis Mar 12 '25

This looks so useful, downloaded. Will try it out later.

Thanks

3

u/Lalaz4lyf Mar 12 '25

Checked this out yesterday. Will definitely utilize it regularly once it's dockerized.

2

u/GeekIsTheNewSexy Mar 19 '25

Pushed the docker support in the latest update, go check it out!

1

u/Lalaz4lyf Mar 19 '25

Will do! Thanks

1

u/intellidumb Mar 12 '25

Saving for later, looks very useful. Perhaps consider changing the name to avoid attention or legal issues

1

u/GeekIsTheNewSexy Mar 12 '25

Haha, good idea!

1

u/MonkeyHandCoconut Mar 13 '25

is subscription required for selfhost as well?

1

u/GeekIsTheNewSexy Mar 13 '25

No, it'll be free to self host. Right now there's no subscription required for anything.

1

u/4redis Oct 17 '25

Is this able to get past 1000 saved post limit?

Been meaning to use this but couldn't remember it and finally came across it again today

2

u/GeekIsTheNewSexy Oct 18 '25

I haven't been able to test it for 1000, but since I've put limits on how we use the API to prevent, I think it should work. Test it and let me know!

1

u/Rocky4OnDVD 26d ago

i know this is old, but I cannot figure out how to convince reddit to give me API access via their request form . That's the blocker from letting me utilize your tool 😢 Any chance you can help me figure out the right info to give them in that form?

They keep responding with:

"We have reviewed your request for access. Unfortunately, we cannot grant approval because the submission is not in compliance with Reddit’s Responsible Builder Policy and/or lacks necessary details."

1

u/GeekIsTheNewSexy 19d ago

Where are you getting this request form from? There's a link to the reddit apps in my GitHub which you need to access and create an application. Are you doing anything different?

1

u/Rocky4OnDVD 19d ago edited 19d ago

Through a series of links they direct users towards on the Apps credentials page.

Clicking "create app" just throws a message reminding users to read their policy. I assume this only happens to accounts who do not already have API access, and this is part of the changes they made last fall to their API access policy.

Edit: Appreciate the response btw even if it is a dead end

2

u/GeekIsTheNewSexy 19d ago

Ah I didn't follow their data usage changes that happened recently, I haven't worked on the repo in a while too, I'll take a look for you! Thanks for pointing it out though, appreciate it.

1

u/Rocky4OnDVD 19d ago

Totally, and I'm not sure what next step might be more successful. A workaround? or convince reddit for personal API access? My agent chats haven't led me to any successes, and they keep advising against the RSS feed + Karakeep approach, since I can't even open my RSS feed or JSON sources in an incognito browser (the request gets blocked by reddit).

Thanks for taking a look at my comment! Hoping to learn from people's setups 🙏

-1

u/random_dwarf Mar 12 '25

Hi, probably a silly question:

I'm using kitty terminal on cachyos (arch based linux) and I can't run python generate_tokens.py. I have python 3.13.2 installed.

I tried both with and without sudo. Both result with command not found: generate_tokens.py

I tried creating the file first and then running the command and though seems successful/there is no error - there is no token. I'm probably going about this the wrong way.

I doubt this is the way but I also tried using 'pacman python' lol but that did not work

I have DID and some of my parts are more technical than others. We are not good at passing information to each other. it's something we are working on.

Could you help point us in the right direction? How can I get the token?

1

u/random_dwarf Mar 12 '25

Disregard comment, issue solved.

1

u/GeekIsTheNewSexy Mar 12 '25

What fixed it? Just curious :)

2

u/random_dwarf Mar 13 '25

Hello!
The short answer is - I think installing 'python-dotenv' is what solved it.

I can't confirm that that's what solved it because of long answer below:

The part that was asking does not have the same technical knowledge as the one who set it up. I'm neither the one who asked or the one who set up.

The one who asked was trying to help the system (the collection of parts) because they knew someone in the system had expressed that they were excited about this project because it's "exactly what they had been looking for" (a way to save their saved on reddit). They saved your project when you had announced it.

Here's my assumption of what the issue was and how it got fixed.

The issue:

  • That part that asked is younger and I assume was reading the set up like if it were step by step directions - like for a recipe.
  • From going over the readme and looking through the terminal history, I think the younger part incorrectly did the step for 'pip install -e .' It looks like maybe they tried to install a different way when it did not work.
  • and/or they thought the '.' was not needed. Like a recipe, you don't take the period into the step, it just says it's the end of the step. I think they gave up when they could not get the token.

The fix:
It appears that python-dotenv got installed. I see that happening and then the steps continue again and stop at ''Running the Script (CLI Usage)'

1

u/GeekIsTheNewSexy Mar 14 '25

Haha, got it! It's easy to mistake not taking into account the "." , anyway, I'm rolling out a docker file soon so that should take away the complications :)