From 66ab25d936492a766a513f14b0aeb22bc8e40975 Mon Sep 17 00:00:00 2001 From: jwansek Date: Tue, 8 Jan 2019 18:15:08 +0000 Subject: not even sure what these changes are --- SmallYTChannelBotSubmissions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'SmallYTChannelBotSubmissions.py') diff --git a/SmallYTChannelBotSubmissions.py b/SmallYTChannelBotSubmissions.py index aa3943d..5c98528 100644 --- a/SmallYTChannelBotSubmissions.py +++ b/SmallYTChannelBotSubmissions.py @@ -6,6 +6,7 @@ from operator import itemgetter from database import Database import matplotlib import datetime +import ytapi import login import time import praw @@ -14,8 +15,8 @@ import os reddit = login.REDDIT -subreddit = reddit.subreddit("SmallYTChannel") -#subreddit = reddit.subreddit("jwnskanzkwktest") +#subreddit = reddit.subreddit("SmallYTChannel") +subreddit = reddit.subreddit("jwnskanzkwktest") db = Database() -- cgit v1.2.3 From 7937aadec4389bfe96d3d80cfad50312efa2e5d9 Mon Sep 17 00:00:00 2001 From: jwansek Date: Tue, 8 Jan 2019 20:29:22 +0000 Subject: fixed a but with dates and fixed memory leak --- SmallYTChannelBotSubmissions.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'SmallYTChannelBotSubmissions.py') diff --git a/SmallYTChannelBotSubmissions.py b/SmallYTChannelBotSubmissions.py index db45e1e..ca447b7 100644 --- a/SmallYTChannelBotSubmissions.py +++ b/SmallYTChannelBotSubmissions.py @@ -242,12 +242,12 @@ def main(): else: if score < 3: text = """Thank you for submitting to /r/SmallYTChannel. Unfortunally, you submission has been removed since you do not have enough λ. You need - 3λ to post. You currently have %iλ. For more information, read the [FAQ](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % score + 3λ to post. You currently have %iλ. For more information, read the [FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % score submission.mod.remove() else: text = """Thank you for submitting to /r/SmallYTChannel. You have spent 3λ to submit here, making your current balance %iλ. /u/%s, please comment `!givelambda` to the most helpful advice you are given. You - will be rewarded 1λ if you do so. For more information, read the [FAQ](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % (score - 3, str(submission.author)) + will be rewarded 1λ if you do so. For more information, read the [FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % (score - 3, str(submission.author)) db.change_lambda(str(submission.author), -3) try: @@ -258,7 +258,7 @@ def main(): text += """ \n\n\n##Video data: -Field|Data +**Field**|**Data** :-|:- Title|%s Thumbnail|[Link](%s) @@ -270,7 +270,7 @@ Description|%s ##Channel Data: -Field|Data +**Field**|**Data** :-|:- Name|%s Thumbnail|[Link](%s) @@ -310,9 +310,9 @@ Views|%s continue if __name__ == "__main__": - #file = open("pid.txt", "w") - #file.write(str(os.getpid())) - #file.close() + file = open("pid.txt", "w") + file.write(str(os.getpid())) + file.close() print("\n####################\n[%s] RESTARTED\n####################\n" % get_time()) main() -- cgit v1.2.3