Skip to content

Commit 6ff3cd8

Browse files
author
Tor Hveem
committed
new name
1 parent 23afb3c commit 6ff3cd8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Redditnotify/supyreddit.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import reddit
2+
3+
4+
r = reddit.Reddit(user_agent="Redditnotify")
5+
6+
def fetch_stories(subreddit, amount=5):
7+
stories = r.get_subreddit(subreddit).get_new(limit=5)
8+
return list(stories)
9+
10+
def submit(title, url):
11+
r.login('fixme', 'fixme')
12+
res = r.submit('fixme', url, title)
13+
return res
14+
15+
16+
if __name__=='__main__':
17+
from pprint import pprint
18+
pprint (submit('Test', 'testurl'))
19+
#print fetch_stories('emmawatson')
20+

0 commit comments

Comments
 (0)