@ -41,7 +41,7 @@ def get_reddit_post(sub, is_image_post=False):
except Exception as e:
return e
if post == None:
if post is None:
return "Random geht in diesem Sub leider nicht :("
if is_image_post:
@ -215,7 +215,6 @@ def main():
"""Start the bot."""
# Create the EventHandler and pass it your bot's token.
token = open("config/token").read()
# token = open("config/test_token").read()
updater = Updater(token.strip())
jq = updater.job_queue
@ -9,7 +9,7 @@ urls = {
def send_coding_love_gif(bot, update):
random_url = re.search('href="(.*)".*\n.*random\(\)', requests.get(urls["codinglove"]).text).group(1)
random_url = re.search('href="(.*)".*\n.*\n.*random\( \)', requests.get(urls["codinglove"]).text).group(1)
random_page_content = requests.get(random_url)
random_page_content.encoding = 'utf-8'