mirror of
https://github.com/Nick80835/microbot
synced 2025-09-02 15:35:43 +00:00
unify scraper limits
This commit is contained in:
@@ -36,7 +36,7 @@ async def danbooru(event):
|
|||||||
elif safety_arg == "q":
|
elif safety_arg == "q":
|
||||||
rating = "Rating:questionable"
|
rating = "Rating:questionable"
|
||||||
|
|
||||||
params = {"limit": 1,
|
params = {"limit": 3,
|
||||||
"random": "true",
|
"random": "true",
|
||||||
"tags": f"{rating} {event.args}".strip().replace(" ", " ")}
|
"tags": f"{rating} {event.args}".strip().replace(" ", " ")}
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@ async def danbooru_ping(event):
|
|||||||
"s": "post",
|
"s": "post",
|
||||||
"q": "index",
|
"q": "index",
|
||||||
"json": 1,
|
"json": 1,
|
||||||
|
"limit": 3,
|
||||||
"tags": f"sort:random"}
|
"tags": f"sort:random"}
|
||||||
|
|
||||||
start = time_ns()
|
start = time_ns()
|
||||||
@@ -44,6 +45,7 @@ async def gelbooru(event):
|
|||||||
"s": "post",
|
"s": "post",
|
||||||
"q": "index",
|
"q": "index",
|
||||||
"json": 1,
|
"json": 1,
|
||||||
|
"limit": 3,
|
||||||
"tags": f"{rating} {event.args} sort:random".strip().replace(" ", " ")}
|
"tags": f"{rating} {event.args} sort:random".strip().replace(" ", " ")}
|
||||||
|
|
||||||
async with ldr.aioclient.get(GEL_URL, params=params) as response:
|
async with ldr.aioclient.get(GEL_URL, params=params) as response:
|
||||||
@@ -93,6 +95,7 @@ async def gelbooru_inline(event):
|
|||||||
"s": "post",
|
"s": "post",
|
||||||
"q": "index",
|
"q": "index",
|
||||||
"json": 1,
|
"json": 1,
|
||||||
|
"limit": 3,
|
||||||
"tags": f"{rating} {event.args} sort:random".strip().replace(" ", " ")}
|
"tags": f"{rating} {event.args} sort:random".strip().replace(" ", " ")}
|
||||||
|
|
||||||
async with ldr.aioclient.get(GEL_URL, params=params) as response:
|
async with ldr.aioclient.get(GEL_URL, params=params) as response:
|
||||||
@@ -122,6 +125,7 @@ async def gelbooru_buttons(event):
|
|||||||
"s": "post",
|
"s": "post",
|
||||||
"q": "index",
|
"q": "index",
|
||||||
"json": 1,
|
"json": 1,
|
||||||
|
"limit": 30,
|
||||||
"tags": f"{event.args} sort:random"}
|
"tags": f"{event.args} sort:random"}
|
||||||
|
|
||||||
async with ldr.aioclient.get(GEL_URL, params=params) as response:
|
async with ldr.aioclient.get(GEL_URL, params=params) as response:
|
||||||
|
@@ -14,7 +14,7 @@ san_button_dict = {}
|
|||||||
@ldr.add("sanping", sudo=True, hide_help=True)
|
@ldr.add("sanping", sudo=True, hide_help=True)
|
||||||
async def sankaku_ping(event):
|
async def sankaku_ping(event):
|
||||||
params = {"page": 1,
|
params = {"page": 1,
|
||||||
"limit": 5,
|
"limit": 3,
|
||||||
"tags": f"order:random"}
|
"tags": f"order:random"}
|
||||||
|
|
||||||
start = time_ns()
|
start = time_ns()
|
||||||
@@ -38,7 +38,7 @@ async def sankaku(event):
|
|||||||
rating = "rating:questionable"
|
rating = "rating:questionable"
|
||||||
|
|
||||||
params = {"page": 1,
|
params = {"page": 1,
|
||||||
"limit": 5,
|
"limit": 3,
|
||||||
"tags": f"order:random {rating} {event.args}".strip().replace(" ", " ")}
|
"tags": f"order:random {rating} {event.args}".strip().replace(" ", " ")}
|
||||||
|
|
||||||
async with ldr.aioclient.get(SAN_URL, params=params) as response:
|
async with ldr.aioclient.get(SAN_URL, params=params) as response:
|
||||||
|
Reference in New Issue
Block a user