Skip to content

Instantly share code, notes, and snippets.

@jmalvarez97
Created March 15, 2023 16:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jmalvarez97/c32de580fa3401c0396e7edfca6dadd9 to your computer and use it in GitHub Desktop.
Save jmalvarez97/c32de580fa3401c0396e7edfca6dadd9 to your computer and use it in GitHub Desktop.
Script falopa para ver las entradas
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