17 lines
588 B
Python
17 lines
588 B
Python
from discord_webhook import DiscordWebhook, DiscordEmbed
|
|
webhookURL = "https://discordapp.com/api/webhooks/719690867811811348/8LExCQbqOPP0XAdNcbV8JHrVYupOSYmeLwkBJWCDCe72JoPyc4Yy_R2wzbkKSN33MPAn"
|
|
|
|
import cv2
|
|
vidcap = cv2.VideoCapture("rtsp://10.85.3.33:554/11")
|
|
success,image = vidcap.read()
|
|
if success:
|
|
cv2.imwrite("LibraryFrame.png", image)
|
|
|
|
webhook = DiscordWebhook(url=webhookURL, content="This a test") # Send the output to the webhook URL
|
|
|
|
with open("LibraryFrame.png", "rb") as f:
|
|
webhook.add_file(file=f.read(), filename='LibraryFrame.png')
|
|
|
|
|
|
response = webhook.execute()
|