q6 commited on
Commit
fc76ebd
·
1 Parent(s): d7d9d98
Files changed (2) hide show
  1. API/app.py +3 -3
  2. Client/Extract Pixiv/ai_search.py +1 -1
API/app.py CHANGED
@@ -91,11 +91,11 @@ def base26_time():
91
  async def search_endpoint(
92
  raw: str = Query(..., description="The raw URL to search."),
93
  pages: int = Query(1, description="Number of pages to fetch."),
94
- ai_only: bool = Query(True, description="Filter for AI-generated content.")
 
95
  ):
96
- print(raw, pages, ai_only, cookies, headers)
97
  try:
98
- post_ids, keywords = await search(raw, pages, ai_only, cookies=cookies, headers=headers)
99
  return {"post_ids": post_ids, "filename": base26_time() + "_" + keywords}
100
  except Exception as e:
101
  return {"error": str(e)}
 
91
  async def search_endpoint(
92
  raw: str = Query(..., description="The raw URL to search."),
93
  pages: int = Query(1, description="Number of pages to fetch."),
94
+ ai_only: bool = Query(True, description="Filter for AI-generated content."),
95
+ real_only: bool = Query(True, description="Filter for real content."),
96
  ):
 
97
  try:
98
+ post_ids, keywords = await search(raw, pages, ai_only, real_only, cookies=cookies, headers=headers)
99
  return {"post_ids": post_ids, "filename": base26_time() + "_" + keywords}
100
  except Exception as e:
101
  return {"error": str(e)}
Client/Extract Pixiv/ai_search.py CHANGED
@@ -1,7 +1,7 @@
1
  import requests
2
  import os
3
 
4
- local = 1
5
  if local:
6
  endpoint = "http://127.0.0.1:7860"
7
  else:
 
1
  import requests
2
  import os
3
 
4
+ local = 0
5
  if local:
6
  endpoint = "http://127.0.0.1:7860"
7
  else: