mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
updated sites_inspector
This commit is contained in:
@@ -63,7 +63,7 @@ async def request_site_home_page(url: str, semophore):
|
||||
|
||||
async def run():
|
||||
semaphore = asyncio.Semaphore(50) # 限制并发量为50
|
||||
sites = [site for site in col.find({'rank': {'$lte': 100}})]
|
||||
sites = [site for site in col.find({'rank': {'$lte': 5000}})]
|
||||
urls = [site['_id'] for site in sites]
|
||||
to_get = [request_site(url, semaphore) for url in urls]
|
||||
to_get += [request_site_home_page(url, semaphore) for url in urls]
|
||||
|
||||
Reference in New Issue
Block a user