Spaces:
Runtime error
Runtime error
Commit
·
19d39ae
1
Parent(s):
9d693ad
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def download_local(url):
|
|
| 26 |
|
| 27 |
def download(text):
|
| 28 |
pattern = '(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-&?=%.]+'
|
| 29 |
-
print(text)
|
| 30 |
urls = re.findall(pattern, text)
|
| 31 |
print(f'{len(urls)} urls')
|
| 32 |
|
|
@@ -39,9 +39,9 @@ def download(text):
|
|
| 39 |
print('downloading...')
|
| 40 |
|
| 41 |
try:
|
| 42 |
-
download_local(
|
| 43 |
except Exception as e :
|
| 44 |
-
err_msgs.append(f'error downloading: {
|
| 45 |
|
| 46 |
#zipping
|
| 47 |
print('zipping ...')
|
|
|
|
| 26 |
|
| 27 |
def download(text):
|
| 28 |
pattern = '(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-&?=%.]+'
|
| 29 |
+
#print(text)
|
| 30 |
urls = re.findall(pattern, text)
|
| 31 |
print(f'{len(urls)} urls')
|
| 32 |
|
|
|
|
| 39 |
print('downloading...')
|
| 40 |
|
| 41 |
try:
|
| 42 |
+
download_local(urls)
|
| 43 |
except Exception as e :
|
| 44 |
+
err_msgs.append(f'error downloading: {urls} - {str(e)}')
|
| 45 |
|
| 46 |
#zipping
|
| 47 |
print('zipping ...')
|