Browse Source

fixed codinglove, removed testcode

master
Angerstoner 6 years ago
parent
commit
800fa89b17
  1. 2
      reddit.py
  2. 1
      schneiderbot.py
  3. 2
      web_requests.py

2
reddit.py

@ -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:

1
schneiderbot.py

@ -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

2
web_requests.py

@ -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'

Loading…
Cancel
Save