xavdid / reddit-user-to-sqlite

Pull Reddit user data into a SQLite database
https://pypi.org/project/reddit-user-to-sqlite/
MIT License
215 stars 9 forks source link

Include saved posts #2

Closed fugkco closed 1 year ago

fugkco commented 1 year ago

Anything that's on https://www.reddit.com/user/<username/saved/

Robin-Law commented 1 year ago

Agreed! This would be invaluable to me, as I'm mostly a lurker, but I do save a lot of posts that I want to refer back to later.

xavdid commented 1 year ago

I can probably make this happen! I'll look into it next week.

quarkw commented 1 year ago

Saved comments too would be great! Both are also included as CSVs in the GDPR archive

xavdid commented 1 year ago

Ok, I've got a (probably) working version of this in https://github.com/xavdid/reddit-user-to-sqlite/pull/16

Before I merge & release, does someone mind trying it out? Instructions:

  1. duplicate the database you're going to work on in case something goes wrong
  2. clone this repo, check out the TASK-146-add-saved-support branch
  3. run python -m venv .venv
  4. run source ./.venv/bin/activate
  5. run pip install .
  6. run the archive command targeting your existing (preferred) database: reddit-user-to-sqlite archive ~/some/path

It adds saved comments and posts to their own table, which has the same features and columns as the original posts and comments tables.

If nothing goes wrong and this does what you want, I'll get it released!

xavdid commented 1 year ago

This has been released as part of 0.4.0. Please let me know what you think!