Created
March 15, 2023 16:25
-
-
Save jmalvarez97/c32de580fa3401c0396e7edfca6dadd9 to your computer and use it in GitHub Desktop.
Script falopa para ver las entradas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from lxml import html | |
import time | |
from datetime import datetime | |
from tkinter import messagebox | |
from playsound import playsound | |
''' | |
Ya esta publicado en la pagina, pero no tiene ningun hipervinculo, sonara la alarma cuando se agrege alguno. | |
''' | |
while True: | |
res = requests.get("https://www.deportick.com/") | |
source_code = html.fromstring(res.content) | |
eventoArgentina = source_code.xpath('/html/body/div[4]/div/div[2]/div/div/div/div[1]/div/a')[0] | |
link = eventoArgentina.get('href') | |
if link: | |
print("\nHora: {}\nSe publicaron las entradas!\n".format(datetime.fromtimestamp(time.time()))) | |
playsound('chiquitapia.mp3') | |
messagebox.showinfo(message="La imagen tiene un link asociado!", title="ATENCION") | |
print(link) | |
break | |
else: | |
print("\nHora: {}\nSiguen sin publicarse las entradas :C\n".format(datetime.fromtimestamp(time.time()))) | |
time.sleep(60) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment