Beispiel #1
0
	print('unable to reply to post')
else:
	print('replied to %s, %s' % (result['parent'], result['id']))

# Reply to comment
print('replying to comment by %s' % (comment.author))
result = reddit.reply(comment, "I like the part where you said:\n\n>%s" % comment.body.replace('\n\n', '\n\n>'))
if result == {}:
	print('unable to reply to post')
else:
	print('replied to %s, %s' % (result['parent'], result['id']))


# Testing submitting link
print('submitting link to /r/%s' % MOD_SUB)
result = reddit.post_link('best website ever', 'http://derv.us', MOD_SUB)
if result == '':
	print('unable to submit link!')
else:
	print('submitted. %s' % result)

# Testing submitting self-post
print('submitting self-post to /r/%s' % MOD_SUB)
result = reddit.post_self('DAE breathe?', 'I thought I was the only one!', MOD_SUB)
if result == '':
	print('unable to submit link!')
else:
	print('submitted.', result)


# Testing modmail
Beispiel #2
0
else:
    print('replied to %s, %s' % (result['parent'], result['id']))

# Reply to comment
print('replying to comment by %s' % (comment.author))
result = reddit.reply(
    comment, "I like the part where you said:\n\n>%s" %
    comment.body.replace('\n\n', '\n\n>'))
if result == {}:
    print('unable to reply to post')
else:
    print('replied to %s, %s' % (result['parent'], result['id']))

# Testing submitting link
print('submitting link to /r/%s' % MOD_SUB)
result = reddit.post_link('best website ever', 'http://derv.us', MOD_SUB)
if result == '':
    print('unable to submit link!')
else:
    print('submitted. %s' % result)

# Testing submitting self-post
print('submitting self-post to /r/%s' % MOD_SUB)
result = reddit.post_self('DAE breathe?', 'I thought I was the only one!',
                          MOD_SUB)
if result == '':
    print('unable to submit link!')
else:
    print('submitted.', result)

# Testing modmail