Cistern commited on
Commit
0f5d27e
Β·
verified Β·
1 Parent(s): 4f58073

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -248,6 +248,7 @@ def crawl_onion_directory(url, rel_path=""):
248
  return
249
 
250
  log(f"πŸ“‚ Scanning directory index: /{rel_path}")
 
251
 
252
  start_time = time.time()
253
  try:
@@ -259,7 +260,7 @@ def crawl_onion_directory(url, rel_path=""):
259
 
260
  html = r.text
261
  elapsed = time.time() - start_time
262
- log(f" Received {len(html)} bytes in {elapsed:.2f}s from /{rel_path}")
263
 
264
  # Use lxml for faster parsing if available, else fallback to html.parser
265
  try:
@@ -287,7 +288,7 @@ def crawl_onion_directory(url, rel_path=""):
287
  # Yield file immediately so download can start
288
  yield (full_url, new_rel_path)
289
 
290
- log(f" Found {file_count} files and {len(subdirectory_links)} subdirectories in /{rel_path}")
291
 
292
  # Now recurse into subdirectories
293
  success = True
 
248
  return
249
 
250
  log(f"πŸ“‚ Scanning directory index: /{rel_path}")
251
+ log(f" 🌐 Fetching directory listing...")
252
 
253
  start_time = time.time()
254
  try:
 
260
 
261
  html = r.text
262
  elapsed = time.time() - start_time
263
+ log(f" βœ… Fetched listing in {elapsed:.2f}s ({len(html)} bytes)")
264
 
265
  # Use lxml for faster parsing if available, else fallback to html.parser
266
  try:
 
288
  # Yield file immediately so download can start
289
  yield (full_url, new_rel_path)
290
 
291
+ log(f" πŸ“ Found {file_count} files and {len(subdirectory_links)} subdirectories in /{rel_path}")
292
 
293
  # Now recurse into subdirectories
294
  success = True