spiderforce4ai 1.3__tar.gz → 1.5__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/PKG-INFO +1 -1
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/pyproject.toml +1 -1
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/setup.py +1 -1
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/spiderforce4ai/__init__.py +35 -16
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/spiderforce4ai.egg-info/PKG-INFO +1 -1
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/README.md +0 -0
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/setup.cfg +0 -0
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/spiderforce4ai.egg-info/SOURCES.txt +0 -0
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/spiderforce4ai.egg-info/dependency_links.txt +0 -0
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/spiderforce4ai.egg-info/requires.txt +0 -0
- {spiderforce4ai-1.3 → spiderforce4ai-1.5}/spiderforce4ai.egg-info/top_level.txt +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "spiderforce4ai"
|
7
|
-
version = "1.
|
7
|
+
version = "1.5"
|
8
8
|
description = "Python wrapper for SpiderForce4AI HTML-to-Markdown conversion service"
|
9
9
|
readme = "README.md"
|
10
10
|
authors = [{name = "Piotr Tamulewicz", email = "pt@petertam.pro"}]
|
@@ -296,17 +296,25 @@ class SpiderForce4AI:
|
|
296
296
|
|
297
297
|
results.append(result)
|
298
298
|
|
299
|
-
#
|
300
|
-
if config.save_reports:
|
301
|
-
self._save_report_sync(results, config)
|
302
|
-
print(f"\nReport saved to: {config.report_file}")
|
303
|
-
|
304
|
-
# Print summary
|
299
|
+
# Calculate statistics
|
305
300
|
successful = len([r for r in results if r.status == "success"])
|
306
301
|
failed = len([r for r in results if r.status == "failed"])
|
302
|
+
|
303
|
+
# Print summary
|
307
304
|
print(f"\nParallel processing completed:")
|
308
305
|
print(f"✓ Successful: {successful}")
|
309
306
|
print(f"✗ Failed: {failed}")
|
307
|
+
|
308
|
+
# Save report if enabled
|
309
|
+
if config.save_reports and config.report_file:
|
310
|
+
self._retry_stats = {
|
311
|
+
"initial_failures": failed,
|
312
|
+
"failure_ratio": (failed / len(urls)) * 100,
|
313
|
+
"retry_successful": 0, # No retries in server parallel mode
|
314
|
+
"retry_failed": failed
|
315
|
+
}
|
316
|
+
self._save_report_sync(results, config)
|
317
|
+
console.print(f"📊 Report saved to: {config.report_file}")
|
310
318
|
|
311
319
|
return results
|
312
320
|
|
@@ -556,10 +564,7 @@ class SpiderForce4AI:
|
|
556
564
|
else:
|
557
565
|
results = initial_results
|
558
566
|
|
559
|
-
#
|
560
|
-
await self._save_report(config)
|
561
|
-
|
562
|
-
# Calculate final statistics
|
567
|
+
# Calculate final statistics before saving report
|
563
568
|
final_successful = len([r for r in results if r.status == "success"])
|
564
569
|
final_failed = len([r for r in results if r.status == "failed"])
|
565
570
|
|
@@ -575,7 +580,15 @@ class SpiderForce4AI:
|
|
575
580
|
retry_successful = initial_failed - final_failed
|
576
581
|
console.print(f"Retry success rate: {retry_successful}/{initial_failed} ({(retry_successful/initial_failed)*100:.1f}%)")
|
577
582
|
|
578
|
-
|
583
|
+
# Save final report after all retries are complete
|
584
|
+
if config.save_reports:
|
585
|
+
self._retry_stats = {
|
586
|
+
"initial_failures": initial_failed,
|
587
|
+
"failure_ratio": failure_ratio,
|
588
|
+
"retry_successful": retry_successful if initial_failed > 0 else 0,
|
589
|
+
"retry_failed": final_failed
|
590
|
+
}
|
591
|
+
await self._save_report(config)
|
579
592
|
console.print(f"📊 Report saved to: {config.report_file}")
|
580
593
|
|
581
594
|
return results
|
@@ -656,11 +669,6 @@ class SpiderForce4AI:
|
|
656
669
|
status = "✓" if result.status == "success" else "✗"
|
657
670
|
progress.description = f"Last: {status} {result.url}"
|
658
671
|
|
659
|
-
# Save final report
|
660
|
-
if config.report_file:
|
661
|
-
self._save_report_sync(results, config)
|
662
|
-
print(f"\nReport saved to: {config.report_file}")
|
663
|
-
|
664
672
|
# Calculate initial failure statistics
|
665
673
|
failed_results = [r for r in results if r.status == "failed"]
|
666
674
|
initial_failed = len(failed_results)
|
@@ -715,6 +723,17 @@ class SpiderForce4AI:
|
|
715
723
|
retry_successful = initial_failed - final_failed
|
716
724
|
console.print(f"Retry success rate: {retry_successful}/{initial_failed} ({(retry_successful/initial_failed)*100:.1f}%)")
|
717
725
|
|
726
|
+
# Save final report after all retries are complete
|
727
|
+
if config.save_reports:
|
728
|
+
self._retry_stats = {
|
729
|
+
"initial_failures": initial_failed,
|
730
|
+
"failure_ratio": failure_ratio,
|
731
|
+
"retry_successful": retry_successful if initial_failed > 0 else 0,
|
732
|
+
"retry_failed": final_failed
|
733
|
+
}
|
734
|
+
self._save_report_sync(results, config)
|
735
|
+
console.print(f"📊 Report saved to: {config.report_file}")
|
736
|
+
|
718
737
|
return results
|
719
738
|
|
720
739
|
async def __aenter__(self):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|