39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
import logging
|
|
import undetected_chromedriver as uc
|
|
from pyvirtualdisplay.smartdisplay import SmartDisplay
|
|
from discord import Colour, Embed, File, RequestsWebhookAdapter, Webhook
|
|
from time import sleep
|
|
webhookFailure = Webhook.from_url("https://canary.discord.com/api/webhooks/1079058123588915283/Z6lDKBF6Wvi8zf6ld_Mkxb9vCPyulIKl_7oXrdkki1uHHTOQWce-jOOTSMchsJNJIvP8", adapter=RequestsWebhookAdapter())
|
|
|
|
|
|
from flask import Flask
|
|
|
|
app = Flask(__name__)
|
|
|
|
@app.route("/")
|
|
def hello_world():
|
|
return "<p>Hello, World!</p>"
|
|
|
|
def temp():
|
|
display = SmartDisplay(size=(2000, 1000))
|
|
display.start()
|
|
driver = uc.Chrome()
|
|
driver.get('https://piair.xyz') # or any other website
|
|
|
|
sleep(10)
|
|
driver.save_screenshot("screenshot.png")
|
|
embed = Embed(
|
|
title="uéuéué la V6",
|
|
description="OKAY",
|
|
colour=Colour.green(),
|
|
)
|
|
|
|
|
|
file = File("screenshot.png")
|
|
webhookFailure.send(embed=embed, username="error", file=file)
|
|
|
|
embed.set_image(url="attachment://screenshot.png")
|
|
|
|
|
|
driver.close()
|
|
display.stop() |