unrealon 1.1.1__py3-none-any.whl → 1.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. unrealon/__init__.py +16 -6
  2. unrealon-1.1.4.dist-info/METADATA +658 -0
  3. unrealon-1.1.4.dist-info/RECORD +54 -0
  4. {unrealon-1.1.1.dist-info → unrealon-1.1.4.dist-info}/entry_points.txt +1 -1
  5. unrealon_browser/__init__.py +3 -6
  6. unrealon_browser/core/browser_manager.py +86 -84
  7. unrealon_browser/dto/models/config.py +2 -0
  8. unrealon_browser/managers/captcha.py +165 -185
  9. unrealon_browser/managers/cookies.py +57 -28
  10. unrealon_browser/managers/logger_bridge.py +94 -34
  11. unrealon_browser/managers/profile.py +186 -158
  12. unrealon_browser/managers/stealth.py +58 -47
  13. unrealon_driver/__init__.py +8 -21
  14. unrealon_driver/exceptions.py +5 -0
  15. unrealon_driver/html_analyzer/__init__.py +32 -0
  16. unrealon_driver/{parser/managers/html.py → html_analyzer/cleaner.py} +330 -405
  17. unrealon_driver/html_analyzer/config.py +64 -0
  18. unrealon_driver/html_analyzer/manager.py +247 -0
  19. unrealon_driver/html_analyzer/models.py +115 -0
  20. unrealon_driver/html_analyzer/websocket_analyzer.py +157 -0
  21. unrealon_driver/models/__init__.py +31 -0
  22. unrealon_driver/models/websocket.py +98 -0
  23. unrealon_driver/parser/__init__.py +4 -23
  24. unrealon_driver/parser/cli_manager.py +6 -5
  25. unrealon_driver/parser/daemon_manager.py +242 -66
  26. unrealon_driver/parser/managers/__init__.py +0 -21
  27. unrealon_driver/parser/managers/config.py +15 -3
  28. unrealon_driver/parser/parser_manager.py +225 -395
  29. unrealon_driver/smart_logging/__init__.py +24 -0
  30. unrealon_driver/smart_logging/models.py +44 -0
  31. unrealon_driver/smart_logging/smart_logger.py +406 -0
  32. unrealon_driver/smart_logging/unified_logger.py +525 -0
  33. unrealon_driver/websocket/__init__.py +31 -0
  34. unrealon_driver/websocket/client.py +249 -0
  35. unrealon_driver/websocket/config.py +188 -0
  36. unrealon_driver/websocket/manager.py +90 -0
  37. unrealon-1.1.1.dist-info/METADATA +0 -722
  38. unrealon-1.1.1.dist-info/RECORD +0 -82
  39. unrealon_bridge/__init__.py +0 -114
  40. unrealon_bridge/cli.py +0 -316
  41. unrealon_bridge/client/__init__.py +0 -93
  42. unrealon_bridge/client/base.py +0 -78
  43. unrealon_bridge/client/commands.py +0 -89
  44. unrealon_bridge/client/connection.py +0 -90
  45. unrealon_bridge/client/events.py +0 -65
  46. unrealon_bridge/client/health.py +0 -38
  47. unrealon_bridge/client/html_parser.py +0 -146
  48. unrealon_bridge/client/logging.py +0 -139
  49. unrealon_bridge/client/proxy.py +0 -70
  50. unrealon_bridge/client/scheduler.py +0 -450
  51. unrealon_bridge/client/session.py +0 -70
  52. unrealon_bridge/configs/__init__.py +0 -14
  53. unrealon_bridge/configs/bridge_config.py +0 -212
  54. unrealon_bridge/configs/bridge_config.yaml +0 -39
  55. unrealon_bridge/models/__init__.py +0 -138
  56. unrealon_bridge/models/base.py +0 -28
  57. unrealon_bridge/models/command.py +0 -41
  58. unrealon_bridge/models/events.py +0 -40
  59. unrealon_bridge/models/html_parser.py +0 -79
  60. unrealon_bridge/models/logging.py +0 -55
  61. unrealon_bridge/models/parser.py +0 -63
  62. unrealon_bridge/models/proxy.py +0 -41
  63. unrealon_bridge/models/requests.py +0 -95
  64. unrealon_bridge/models/responses.py +0 -88
  65. unrealon_bridge/models/scheduler.py +0 -592
  66. unrealon_bridge/models/session.py +0 -28
  67. unrealon_bridge/server/__init__.py +0 -91
  68. unrealon_bridge/server/base.py +0 -171
  69. unrealon_bridge/server/handlers/__init__.py +0 -23
  70. unrealon_bridge/server/handlers/command.py +0 -110
  71. unrealon_bridge/server/handlers/html_parser.py +0 -139
  72. unrealon_bridge/server/handlers/logging.py +0 -95
  73. unrealon_bridge/server/handlers/parser.py +0 -95
  74. unrealon_bridge/server/handlers/proxy.py +0 -75
  75. unrealon_bridge/server/handlers/scheduler.py +0 -545
  76. unrealon_bridge/server/handlers/session.py +0 -66
  77. unrealon_driver/browser/__init__.py +0 -8
  78. unrealon_driver/browser/config.py +0 -74
  79. unrealon_driver/browser/manager.py +0 -416
  80. unrealon_driver/parser/managers/browser.py +0 -51
  81. unrealon_driver/parser/managers/logging.py +0 -609
  82. {unrealon-1.1.1.dist-info → unrealon-1.1.4.dist-info}/WHEEL +0 -0
  83. {unrealon-1.1.1.dist-info → unrealon-1.1.4.dist-info}/licenses/LICENSE +0 -0
@@ -7,40 +7,19 @@ All managers follow strict Pydantic v2 compliance and CRITICAL_REQUIREMENTS.md
7
7
  from .config import ConfigManager, ParserConfig
8
8
  from .result import ResultManager, ParseResult, ParseMetrics, OperationStatus
9
9
  from .error import ErrorManager, RetryConfig, ErrorInfo, ErrorSeverity
10
- from .logging import LoggingManager, LoggingConfig, LogLevel, LogContext
11
- from .html import HTMLManager, HTMLCleaningConfig, HTMLCleaningStats
12
- from .browser import BrowserManager, BrowserConfig, BrowserStats
13
10
 
14
11
  __all__ = [
15
12
  # Config Manager
16
13
  "ConfigManager",
17
14
  "ParserConfig",
18
-
19
15
  # Result Manager
20
16
  "ResultManager",
21
17
  "ParseResult",
22
18
  "ParseMetrics",
23
19
  "OperationStatus",
24
-
25
20
  # Error Manager
26
21
  "ErrorManager",
27
22
  "RetryConfig",
28
23
  "ErrorInfo",
29
24
  "ErrorSeverity",
30
-
31
- # Logging Manager
32
- "LoggingManager",
33
- "LoggingConfig",
34
- "LogLevel",
35
- "LogContext",
36
-
37
- # HTML Manager
38
- "HTMLManager",
39
- "HTMLCleaningConfig",
40
- "HTMLCleaningStats",
41
-
42
- # Browser Manager
43
- "BrowserManager",
44
- "BrowserConfig",
45
- "BrowserStats"
46
25
  ]
@@ -6,6 +6,8 @@ Strict compliance with CRITICAL_REQUIREMENTS.md:
6
6
  - Complete type annotations
7
7
  - Pydantic v2 models everywhere
8
8
  - No mutable defaults
9
+
10
+ Features automatic WebSocket URL detection - no manual configuration needed!
9
11
  """
10
12
 
11
13
  from typing import Optional, List
@@ -14,6 +16,16 @@ from pydantic import BaseModel, Field, ConfigDict, field_validator
14
16
  import uuid
15
17
 
16
18
 
19
+ def _get_auto_websocket_url() -> str:
20
+ """Get WebSocket URL automatically based on environment detection"""
21
+ try:
22
+ from ...websocket import get_websocket_url
23
+ return get_websocket_url()
24
+ except ImportError:
25
+ # Fallback if websocket module not available
26
+ return "ws://localhost:8002/ws"
27
+
28
+
17
29
  class ParserConfig(BaseModel):
18
30
  """
19
31
  Parser configuration with smart defaults and strict typing
@@ -40,10 +52,10 @@ class ParserConfig(BaseModel):
40
52
  description="Parser type for classification"
41
53
  )
42
54
 
43
- # Connection settings
55
+ # Connection settings (auto-detected)
44
56
  websocket_url: str = Field(
45
- default="ws://localhost:8002/ws",
46
- description="WebSocket bridge URL"
57
+ default_factory=lambda: _get_auto_websocket_url(),
58
+ description="WebSocket bridge URL (auto-detected based on environment)"
47
59
  )
48
60
  api_key: Optional[str] = Field(
49
61
  default=None,