|
|
@ -46,7 +46,11 @@ def make_post(post):
|
|
|
|
comment = "".join(_comment)
|
|
|
|
comment = "".join(_comment)
|
|
|
|
reddit_post = Reddit().post(title, url)
|
|
|
|
reddit_post = Reddit().post(title, url)
|
|
|
|
reddit_comment = Reddit().comment(reddit_post, comment)
|
|
|
|
reddit_comment = Reddit().comment(reddit_post, comment)
|
|
|
|
post.reddit_url = reddit_post.url
|
|
|
|
if reddit_post:
|
|
|
|
|
|
|
|
post.to_reddit = True
|
|
|
|
post.save()
|
|
|
|
post.save()
|
|
|
|
print(f"Posted #{post.id} to Reddit - {reddit_post.url}")
|
|
|
|
print(f"Posted #{post.id} to Reddit")
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
print(f"Unable to post #{post.id} to Reddit")
|
|
|
|
|
|
|
|
return False
|
|
|
|