From b08e4fa795a8f324a3137cc03c8bba1ea2c94d07 Mon Sep 17 00:00:00 2001 From: Michael Tan Date: Fri, 17 Jan 2020 11:15:47 -0600 Subject: [PATCH] Fixing link URL. --- linkmakerbot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/linkmakerbot.py b/linkmakerbot.py index cd82dc1..7ff702b 100644 --- a/linkmakerbot.py +++ b/linkmakerbot.py @@ -5,7 +5,7 @@ import re import os import time -LINK_URL="xkcd.com" +LINK_URL="https://xkcd.com" SUBREDDIT_NAME="xkcd" SEARCH_STRING=r"xkcd \d+" DEBUG=1 @@ -23,7 +23,7 @@ def check_for_string(searchString,comment): temp = linkNum.split() temp = temp[-1] temp = int(temp) - myreply+="\n\nhttps://xkcd.com/%d" %temp + myreply+="\n\n%s/%d" %(LINK_URL,temp) return myreply # Create the Reddit instance @@ -67,7 +67,6 @@ for submission in subreddit.hot(limit=5): for thisComment in submission.comments: #time.sleep(2) if thisComment.id not in posts_replied_to: - myreply = check_for_string(SEARCH_STRING,thisComment.body) if myreply: if DEBUG: