fixed webhook for weeks

This commit is contained in:
J-onasJones 2024-06-21 12:44:55 +02:00
parent fb8a94d97c
commit ccca4cb42b

View file

@ -44,7 +44,7 @@ def send_webhook():
data += data2['results']
# Create the message content
content = "Here are the comebacks from today:\n"
content = "# Here are the comebacks from this week:\n"
for i in data:
content += f"{i['date']} > {i['title']} - {i['artist']}: {i['links'] if i['links'] != [] else '*No Links*'}\n"
@ -60,4 +60,8 @@ def send_webhook():
if response.status_code == 204:
print("Webhook sent successfully!")
else:
print(f"Failed to send webhook. Status code: {response.status_code}")
print(f"Failed to send webhook. Status code: {response.status_code}")
if __name__ == "__main__":
send_webhook()