Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|