Browse Source

fixed codinglove image fetch problems

master
Angerstoner 6 years ago
parent
commit
22ba71afe4
  1. 2
      coding_love.py
  2. 2
      schneiderbot.py

2
coding_love.py

@ -12,7 +12,7 @@ def send_coding_love_gif(bot, update):
gif_match = re.search('data="(.*)" type="image/gif"', random_page_content)
if gif_match is None:
gif_match = re.search('og:image" cont ent="(.*)"', random_page_content)
gif_match = re.search('og:image" content="(.*)"', random_page_content)
if gif_match:
gif_url = gif_match.group(1)

2
schneiderbot.py

@ -185,7 +185,7 @@ def error(bot, update, error):
def main():
"""Start the bot."""
# Create the EventHandler and pass it your bot's token.
token = open("token").read()
token = open("test_token").read()
updater = Updater(token.strip())
# Get the dispatcher to register handlers

Loading…
Cancel
Save