Spaces:
Runtime error
Runtime error
Pranjal2041
commited on
Commit
·
ad64dda
1
Parent(s):
d4218cc
Fix Error Msg
Browse files
app.py
CHANGED
@@ -64,10 +64,10 @@ def scrape_click(url):
|
|
64 |
out = scraper.get_product(url)
|
65 |
if isinstance(out, str):
|
66 |
if out == 'Invalid URL':
|
67 |
-
gr.Error("Please enter a valid Amazon URL")
|
68 |
else:
|
69 |
-
gr.Error("Error Occured. Check the URL or try again later.")
|
70 |
print('Error Occured', out)
|
|
|
71 |
return
|
72 |
|
73 |
text = out['description']
|
|
|
64 |
out = scraper.get_product(url)
|
65 |
if isinstance(out, str):
|
66 |
if out == 'Invalid URL':
|
67 |
+
raise gr.Error("Please enter a valid Amazon URL")
|
68 |
else:
|
|
|
69 |
print('Error Occured', out)
|
70 |
+
raise gr.Error("Error Occured. Check the URL or try again later.")
|
71 |
return
|
72 |
|
73 |
text = out['description']
|