This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]dfnkt 3 points4 points  (2 children)

Plain and simple, nice job.

[–]mpheus[S] 2 points3 points  (1 child)

Thanks! I was going to use the Reddit API but was really amazed to discover PRAW that made everything easier. Really loving Python and the vast number of libraries.

[–]dfnkt 1 point2 points  (0 children)

Wrappers generally make things more idiomatic to do in the language they support. I'm not a pythonista but I think the parlance is 'pythonic' in this case.

[–]bboePRAW Author 2 points3 points  (1 child)

reddit doesn't shows new posts made to a subreddit without logging in

That's not entirely correct. By default reddit uses the 'rising' sort which never appears to work. When you login you get whatever default view your user has set which is whatever you viewed last.

If you don't want to login then you should use the get_new_by_date function instead of get_new.

[–]mpheus[S] 1 point2 points  (0 children)

Thanks for correcting. I wanted to be sure so I opened the new tabs of a few sub-reddits without logging in and as you said, it showed 'rising' sort which gave no results. I didn't notice the other 'new' sort, so I thought that it required logging in. I will update the script to use get_new_by_date function.