change max page

This commit is contained in:
MuslemRahimi 2024-10-09 21:21:24 +02:00
parent 6207b52859
commit 56910fc891
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ async def fetch_options_activity(page):
return []
# Asynchronous function to fetch multiple pages
async def fetch_all_pages(max_pages=130):
async def fetch_all_pages(max_pages=15):
tasks = [fetch_options_activity(page) for page in range(max_pages)]
results = await asyncio.gather(*tasks)
return [item for sublist in results for item in sublist]

View File

@ -64,7 +64,7 @@ def process_day(date_str):
# Fetch pages concurrently for the given day
with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
future_to_page = {executor.submit(process_page, page, date_str): page for page in range(130)}
future_to_page = {executor.submit(process_page, page, date_str): page for page in range(15)}
for future in concurrent.futures.as_completed(future_to_page):
page = future_to_page[future]
try: