Spaces:
Sleeping
Sleeping
ksvmuralidhar
commited on
Commit
•
6cd4a90
1
Parent(s):
e5e59f1
Update api.py
Browse files
api.py
CHANGED
@@ -69,7 +69,7 @@ async def scrape_urls(urls):
|
|
69 |
|
70 |
results = []
|
71 |
for url in urls:
|
72 |
-
f = pool.apply_async(
|
73 |
results.append(f) # appending result to results
|
74 |
|
75 |
scraped_texts = []
|
|
|
69 |
|
70 |
results = []
|
71 |
for url in urls:
|
72 |
+
f = pool.apply_async(scrape_text, [url]) # asynchronously applying function to chunk. Each worker parallely begins to work on the job
|
73 |
results.append(f) # appending result to results
|
74 |
|
75 |
scraped_texts = []
|