spiderforce4ai 1.2__py3-none-any.whl → 1.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -350,17 +350,23 @@ class SpiderForce4AI:
350
350
 
351
351
  def _save_report_sync(self, results: List[CrawlResult], config: CrawlConfig) -> None:
352
352
  """Save crawl report synchronously."""
353
+ # Separate successful and failed results
354
+ successful_results = [r for r in results if r.status == "success"]
355
+ failed_results = [r for r in results if r.status == "failed"]
356
+
357
+ # Create report with only final state
353
358
  report = {
354
359
  "timestamp": datetime.now().isoformat(),
355
360
  "config": config.to_dict(),
356
361
  "results": {
357
- "successful": [asdict(r) for r in results if r.status == "success"],
358
- "failed": [asdict(r) for r in results if r.status == "failed"]
362
+ "successful": [asdict(r) for r in successful_results],
363
+ "failed": [asdict(r) for r in failed_results] # Only truly failed URLs after retries
359
364
  },
360
365
  "summary": {
361
366
  "total": len(results),
362
- "successful": len([r for r in results if r.status == "success"]),
363
- "failed": len([r for r in results if r.status == "failed"])
367
+ "successful": len(successful_results),
368
+ "failed": len(failed_results),
369
+ "retry_info": getattr(self, '_retry_stats', {}) # Include retry statistics if available
364
370
  }
365
371
  }
366
372
 
@@ -372,17 +378,22 @@ class SpiderForce4AI:
372
378
  if not config.report_file:
373
379
  return
374
380
 
381
+ # Separate successful and failed results
382
+ successful_results = [r for r in self.crawl_results if r.status == "success"]
383
+ failed_results = [r for r in self.crawl_results if r.status == "failed"]
384
+
375
385
  report = {
376
386
  "timestamp": datetime.now().isoformat(),
377
387
  "config": config.to_dict(),
378
388
  "results": {
379
- "successful": [asdict(r) for r in self.crawl_results if r.status == "success"],
380
- "failed": [asdict(r) for r in self.crawl_results if r.status == "failed"]
389
+ "successful": [asdict(r) for r in successful_results],
390
+ "failed": [asdict(r) for r in failed_results] # Only truly failed URLs after retries
381
391
  },
382
392
  "summary": {
383
393
  "total": len(self.crawl_results),
384
- "successful": len([r for r in self.crawl_results if r.status == "success"]),
385
- "failed": len([r for r in self.crawl_results if r.status == "failed"])
394
+ "successful": len(successful_results),
395
+ "failed": len(failed_results),
396
+ "retry_info": getattr(self, '_retry_stats', {}) # Include retry statistics if available
386
397
  }
387
398
  }
388
399
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: spiderforce4ai
3
- Version: 1.2
3
+ Version: 1.3
4
4
  Summary: Python wrapper for SpiderForce4AI HTML-to-Markdown conversion service
5
5
  Home-page: https://petertam.pro
6
6
  Author: Piotr Tamulewicz
@@ -0,0 +1,5 @@
1
+ spiderforce4ai/__init__.py,sha256=Fbgqu9uPg0wuWZgiVYNTv6CkkcOHgU_f5-uoXRKhgn4,29922
2
+ spiderforce4ai-1.3.dist-info/METADATA,sha256=ybuwcVE62JFnWJKcCdHDrOOqmbuh8PEzF69_yFK-eV0,7183
3
+ spiderforce4ai-1.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
4
+ spiderforce4ai-1.3.dist-info/top_level.txt,sha256=Kth7A21Js7DCp0j5XBBi-FE45SCLouZkeNZU__Yr9Yk,15
5
+ spiderforce4ai-1.3.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- spiderforce4ai/__init__.py,sha256=BHsdGGxEyS4RHbHyTnYRBE4oRy2i1pGSrEt_LT4vKWc,29384
2
- spiderforce4ai-1.2.dist-info/METADATA,sha256=I5gmglzuRXSKwRc0lWk2Vslnx_4PIffIwjJ-SOTeYpU,7183
3
- spiderforce4ai-1.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
4
- spiderforce4ai-1.2.dist-info/top_level.txt,sha256=Kth7A21Js7DCp0j5XBBi-FE45SCLouZkeNZU__Yr9Yk,15
5
- spiderforce4ai-1.2.dist-info/RECORD,,