Ejemplo n.º 1
0
#reddit_collector.collect_posts( 10 )

# collect posts until you get to ID t3_1d64j4
#reddit_collector.collect_posts( -1, "t3_1d64j4" )

# OR, posts through ID t3_1d68lz
#reddit_collector.collect_posts( until_id_IN = "t3_1d68lz" )

# collect posts through date - start of 2013/04/26
#boundary_date = datetime.datetime( 2013, 4, 26, 0, 0, 0, 0 )
#reddit_collector.collect_posts( until_date_IN = boundary_date )

# in the event of a crash, find ID of last record retrieved, then combine
#    arguments to pick up where you left off.
#reddit_collector.collect_posts( until_date_IN = boundary_date, after_id_IN = "t3_1d63sm" )

# or combine to test - just 350 posts, no more.
#reddit_collector.collect_posts( post_count_limit_IN = 350, after_id_IN = "t3_1d4wyy" )

# just grab 300 posts, update if already in the database.
#reddit_collector.collect_posts( post_count_limit_IN = 300, after_id_IN = "t3_1dk89v", do_update_existing_IN = True )

# update existing posts after a certain ID until a certain datetime.
boundary_date = datetime.datetime( 2013, 4, 1, 0, 0, 0 )

# to test, just try 300.
#reddit_collector.collect_posts( until_date_IN = boundary_date, after_id_IN = "t3_1dk89v", do_update_existing_IN = True, post_count_limit_IN = 300 )

# do it.
reddit_collector.collect_posts( until_date_IN = boundary_date, after_id_IN = "t3_1dk89v", do_update_existing_IN = True )