#NEWLINE# def add_streamers( ) : #NEWLINE# #INDENT# submissions = r . get_subreddit ( 'watchpeoplecode' ) . get_new ( limit = None ) #NEWLINE# for s in submissions : #NEWLINE# #INDENT# for url in get_submission_urls ( s ) : #NEWLINE# #INDENT# stream = get_stream_from_url ( url , s . id ) #NEWLINE# if ( stream and ( stream . streamer is None ) ) : #NEWLINE# #INDENT# reddit_username = get_reddit_username ( s , url ) #NEWLINE# if reddit_username : #NEWLINE# #INDENT# stream . streamer = get_or_create ( Streamer , reddit_username = reddit_username ) #NEWLINE# stream . _update_status ( ) #NEWLINE# #UNINDENT# db . session . add ( stream ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# db . session . commit ( )