samedi 27 juin 2015

get URL of any submission for subreddits

I am trying to use PRAW to get new posts from subreddits on Reddit. The following code snippet shows how I get new items on a particular subreddit.

Is there a way to also get the URL of the particular submission?

submissions = r.get_subreddit('todayilearned')
submission = submissions.get_new(limit=1)
sub = [str(x) for x in submission]
print sub

Aucun commentaire:

Enregistrer un commentaire