q6 commited on
Commit
6f595fc
·
1 Parent(s): 8843c0d

Print statemenyd

Browse files
Client/Extract Pixiv/ai_search.py CHANGED
@@ -11,7 +11,7 @@ os.chdir(os.path.dirname(os.path.abspath(__file__)))
11
 
12
  input_url = input("Enter the URL: ")
13
 
14
- pages = 60 // 60
15
 
16
  params = {
17
  'raw': input_url,
 
11
 
12
  input_url = input("Enter the URL: ")
13
 
14
+ pages = 600 // 60
15
 
16
  params = {
17
  'raw': input_url,
Client/clear_db.py CHANGED
@@ -5,6 +5,6 @@ os.chdir(os.path.dirname(os.path.abspath(__file__)))
5
 
6
  shutil.rmtree("images", ignore_errors=True)
7
  shutil.rmtree("db", ignore_errors=True)
8
- # for file in os.listdir():
9
- # if file.endswith(".txt"):
10
- # os.rename(file, f"txt logs/{file}")
 
5
 
6
  shutil.rmtree("images", ignore_errors=True)
7
  shutil.rmtree("db", ignore_errors=True)
8
+ for file in os.listdir():
9
+ if file.endswith(".txt"):
10
+ os.rename(file, f"txt logs/{file}")
Client/hunt.py CHANGED
@@ -58,12 +58,14 @@ for index in indexs:
58
  if to_download:
59
  images_zip = requests.post('https://q6-p.hf.space/download', json={'posts': to_download})
60
 
 
61
  with io.BytesIO(images_zip.content) as f:
62
  with ZipFile(f) as z:
63
  z.extractall("images/Stash")
64
  extracted_files.extend(z.namelist())
65
 
66
  images_cache = os.listdir("images/Stash")
 
67
  for i, post_id in enumerate(post_ids.keys()):
68
  if f"{post_id}.png" in images_cache:
69
  if not os.path.exists(f"images/{group_name}/{i}_{post_id}.png"):
 
58
  if to_download:
59
  images_zip = requests.post('https://q6-p.hf.space/download', json={'posts': to_download})
60
 
61
+ print("Extracting images...")
62
  with io.BytesIO(images_zip.content) as f:
63
  with ZipFile(f) as z:
64
  z.extractall("images/Stash")
65
  extracted_files.extend(z.namelist())
66
 
67
  images_cache = os.listdir("images/Stash")
68
+ print("Linking images...")
69
  for i, post_id in enumerate(post_ids.keys()):
70
  if f"{post_id}.png" in images_cache:
71
  if not os.path.exists(f"images/{group_name}/{i}_{post_id}.png"):