Skip to content

Commit

Permalink
Merge pull request #4 from markekraus/3.03
Browse files Browse the repository at this point in the history
Version 3.03
  • Loading branch information
markekraus committed Apr 19, 2015
2 parents 9ffaf11 + 1c664ec commit fe6d93e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modbot.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Bot settings
# mod bot version text
bot_ver = '3.02'
bot_ver = '3.03'
# Amount of time in seconds to wait between pulls of the top 100 submissions 86400 = 1 day
bot_reloadTopSubsSec = 86400
# Number of top all time submissions to pull
Expand Down
11 changes: 10 additions & 1 deletion modbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def video_id(value):
# AND make sure this post is not a top post itself
if ytvid in topsubmissionvids and submission.id not in topsubmissionsids:
print '!!!! Repost of a top ' + str(bot_topSubsLimit) + ' submission !!!'
reasons.append('* This video is in the [top ' + bot_topSubsLimit +'](http://www.reddit.com/r/'+ r_subredit +'/top/?sort=top&t=all) submission of all time in this sub. ')
reasons.append('* This video is in the [top ' + str(bot_topSubsLimit) +'](http://www.reddit.com/r/'+ r_subredit +'/top/?sort=top&t=all) submission of all time in this sub. ')
try:
# Take a break before searching for reposts, but only if not enough time since the last search has passed.
sleepfor = max(0.0, bot_sleepsec - (time.time() - loopstart))
Expand Down Expand Up @@ -283,6 +283,15 @@ def video_id(value):
e = sys.exc_info()[0]
print '**Main For loop failed: %s' % str(e)
print 'time: ' + time.strftime("%c")
print 'Submission Info:'
try:
pprint(submission.url)
pprint(submission.permalink)
pprint(submission.title)
pprint(submission.author)
already_done.append(submission.id)
except:
pass
print ''
# Time to sleep again before the next loop itteration.
loopend = time.time()
Expand Down

0 comments on commit fe6d93e

Please sign in to comment.