2016-01-21 56 views
0

我一直在尋找的文件爲praw,我根本無法找到哪種方法是通過查看所有帖子。 我想要做的就是看通過所有的後如何通過郵件與大蝦看

import ProcessingBot 
import Auth 
import praw 

SETPHRASES = ["python", "bots", "jarmahent", "is proves there was no Global  Warming in 1966", "test"] 
SETPHRASE = ("This is a bot, ignore this reply") 
USERNAME = Auth.pG 

def run(): 
    r = praw.Reddit(Auth.app_ua) 
    print("Signing In") 

    r.set_oauth_app_info(Auth.app_id, Auth.app_secret, Auth.app_uri) 
    print("Setting Oauth App Info") 

    r.refresh_access_information(Auth.app_refresh) 

    sub = r.get_subreddit("ProcessingImages") 
    print("Getting SubReddit") 
    for: #Look through all the post this is where the post finder will be 

    print("Finished") 




return r 


while True: 
    run() 

的格式是一個小錯誤,我昏昏沉沉地4倍和粘貼,它仍然沒有工作。

回答

0

這是包括在例如在the documentation front page

>>> import praw 
>>> r = praw.Reddit(user_agent='my_cool_application') 
>>> submissions = r.get_subreddit('opensource').get_hot(limit=5) 
>>> [str(x) for x in submissions] 

除了get_hot,還有用於risingtop職位的方法。