Reduce client sophomore
Browse files
Client/Extract Pixiv/ai_search.py
CHANGED
|
@@ -9,7 +9,7 @@ os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
|
| 9 |
|
| 10 |
input_url = input("Enter the URL: ")
|
| 11 |
|
| 12 |
-
pages =
|
| 13 |
|
| 14 |
x=''
|
| 15 |
n=int(time.time()*100)
|
|
|
|
| 9 |
|
| 10 |
input_url = input("Enter the URL: ")
|
| 11 |
|
| 12 |
+
pages = 35
|
| 13 |
|
| 14 |
x=''
|
| 15 |
n=int(time.time()*100)
|
Client/Extract Pixiv/pixiv_api.py
CHANGED
|
@@ -192,7 +192,7 @@ async def process_post(post_id, session, semaphore):
|
|
| 192 |
return post_id, None
|
| 193 |
|
| 194 |
async def get_pixif_data(post_ids):
|
| 195 |
-
semaphore = asyncio.Semaphore(
|
| 196 |
async with aiohttp.ClientSession(cookies=cookies, headers=headers) as session:
|
| 197 |
tasks = [process_post(post_id, session, semaphore) for post_id in post_ids]
|
| 198 |
results = await asyncio.gather(*tasks)
|
|
|
|
| 192 |
return post_id, None
|
| 193 |
|
| 194 |
async def get_pixif_data(post_ids):
|
| 195 |
+
semaphore = asyncio.Semaphore(5)
|
| 196 |
async with aiohttp.ClientSession(cookies=cookies, headers=headers) as session:
|
| 197 |
tasks = [process_post(post_id, session, semaphore) for post_id in post_ids]
|
| 198 |
results = await asyncio.gather(*tasks)
|