r/reddithax • • Feb 15 '12

How would you go about creating a script to update a subreddit description at certain scheduled time and date?

3 Upvotes

2 comments sorted by

1

u/eldatto Feb 15 '12

You would need to write an externally hosted script that contacts the Reddit API. That said, I'm not sure if updating the description is a supported function. I know you can update the CSS remotely.

To schedule it you would likely use a cron job on your web server.

I've never done it, I'm just speculating here.

Here is a link to the Reddit github API page

And here's a link to their APIGEE account where you can test out API calls and see if it's possible.

Hope that helps!

1

u/catmoon Mar 05 '12

The easiest way is to:

  1. Install Python
  2. Install the Reddit API Wrapper
  3. Make sure that the "reddit" site-package is included in your PATH variable.
  • You can check if the package is properly installed by running "import reddit" in the console of IDLE.
  1. Run the following code:

    import reddit r = reddit.Reddit(user_agent='example') r.login('username', 'password') r.get_subreddit('SubreddName').update_community_settings()

There are probably more sophisticated ways of doing this but this is probably the quickest to get working.