change max page
This commit is contained in:
parent
6207b52859
commit
56910fc891
@ -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]
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user