fork(1) download
  1. import time
  2. import praw
  3.  
  4. r = praw.Reddit(user_agent = "Test B ot on r/test by,)
  5. r.set_oauth_app_info() #Ommited
  6.  
  7.  
  8. cache = []
  9.  
  10. def run_bot():
  11. print("Grabbing subreddit...")
  12. subreddit = r.get_subreddit("(MYSUB)")
  13. print("Grabbing posts")
  14. posts = subreddit.get_new(limit=none)
  15. for x in posts:
  16. authorr = post.author.name
  17.  
  18.  
  19. def inf():
  20. while True:
  21. run_bot()
  22. time.sleep(2)
  23.  
  24. sub = r.get_subreddit("the_clinton")
  25.  
  26.  
  27.  
  28.  
  29.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.4/py_compile.py", line 124, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap>", line 1532, in source_to_code
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "./prog.py", line 4
    r = praw.Reddit(user_agent = "Test B ot on r/test by,)
                                                         ^
SyntaxError: EOL while scanning string literal

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.4/py_compile.py", line 128, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 4
    r = praw.Reddit(user_agent = "Test B ot on r/test by,)
                                                         ^
SyntaxError: EOL while scanning string literal

stdout
Standard output is empty