2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 06:26:04 +00:00

unify scraper limits

This commit is contained in:
Nick80835
2020-06-23 12:01:48 -04:00
parent 356330de4c
commit f4bf998d90
3 changed files with 7 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ async def danbooru(event):
elif safety_arg == "q":
rating = "Rating:questionable"
params = {"limit": 1,
params = {"limit": 3,
"random": "true",
"tags": f"{rating} {event.args}".strip().replace(" ", " ")}

View File

@@ -18,6 +18,7 @@ async def danbooru_ping(event):
"s": "post",
"q": "index",
"json": 1,
"limit": 3,
"tags": f"sort:random"}
start = time_ns()
@@ -44,6 +45,7 @@ async def gelbooru(event):
"s": "post",
"q": "index",
"json": 1,
"limit": 3,
"tags": f"{rating} {event.args} sort:random".strip().replace(" ", " ")}
async with ldr.aioclient.get(GEL_URL, params=params) as response:
@@ -93,6 +95,7 @@ async def gelbooru_inline(event):
"s": "post",
"q": "index",
"json": 1,
"limit": 3,
"tags": f"{rating} {event.args} sort:random".strip().replace(" ", " ")}
async with ldr.aioclient.get(GEL_URL, params=params) as response:
@@ -122,6 +125,7 @@ async def gelbooru_buttons(event):
"s": "post",
"q": "index",
"json": 1,
"limit": 30,
"tags": f"{event.args} sort:random"}
async with ldr.aioclient.get(GEL_URL, params=params) as response:

View File

@@ -14,7 +14,7 @@ san_button_dict = {}
@ldr.add("sanping", sudo=True, hide_help=True)
async def sankaku_ping(event):
params = {"page": 1,
"limit": 5,
"limit": 3,
"tags": f"order:random"}
start = time_ns()
@@ -38,7 +38,7 @@ async def sankaku(event):
rating = "rating:questionable"
params = {"page": 1,
"limit": 5,
"limit": 3,
"tags": f"order:random {rating} {event.args}".strip().replace(" ", " ")}
async with ldr.aioclient.get(SAN_URL, params=params) as response: