code: def check_exists(subreddit):
      
      req = get('http://www.reddit.com/r/%s/about.json' % subreddit, headers={'User-Agent': 'CslBot/1.0'})
      if req.json().get('kind') == 'Listing':
          # no subreddit exists, search results page is shown
          return False
      return req.status_code == 200
docs: Make sure that a subreddit actually exists.