tx3bas commited on
Commit
1b9e582
verified
1 Parent(s): 546f832

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -83,6 +83,10 @@ def buscar_google(query, dominio, hl='es', num_results=100):
83
  return html_output
84
 
85
  def canibalizacion_interface(url, keyword):
 
 
 
 
86
  return buscar_google(keyword, url)
87
 
88
  iface = gr.Interface(
 
83
  return html_output
84
 
85
  def canibalizacion_interface(url, keyword):
86
+ # Comprobar si la URL cumple con el patr贸n http o https
87
+ if not re.match(r'^https?://', url):
88
+ return "<p>Error: Introduce una URL con el protocolo http o https.</p>"
89
+
90
  return buscar_google(keyword, url)
91
 
92
  iface = gr.Interface(