webscout 2025.10.14.1__py3-none-any.whl → 2025.10.16__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.
Potentially problematic release.
This version of webscout might be problematic. Click here for more details.
- webscout/Extra/YTToolkit/README.md +1 -1
- webscout/Extra/tempmail/README.md +3 -3
- webscout/Provider/OPENAI/README.md +1 -1
- webscout/Provider/TTI/bing.py +4 -4
- webscout/__init__.py +1 -1
- webscout/cli.py +0 -147
- webscout/client.py +4 -5
- webscout/litprinter/__init__.py +0 -42
- webscout/scout/README.md +59 -8
- webscout/scout/core/scout.py +62 -0
- webscout/scout/element.py +251 -45
- webscout/search/__init__.py +5 -8
- webscout/search/bing_main.py +42 -0
- webscout/search/engines/bing/__init__.py +1 -0
- webscout/search/engines/bing/base.py +33 -0
- webscout/search/engines/bing/images.py +108 -0
- webscout/search/engines/bing/news.py +91 -0
- webscout/search/engines/bing/suggestions.py +34 -0
- webscout/search/engines/bing/text.py +106 -0
- webscout/search/engines/duckduckgo/maps.py +13 -0
- webscout/search/engines/yahoo/__init__.py +41 -0
- webscout/search/engines/yahoo/answers.py +16 -0
- webscout/search/engines/yahoo/base.py +34 -0
- webscout/search/engines/yahoo/images.py +324 -0
- webscout/search/engines/yahoo/maps.py +16 -0
- webscout/search/engines/yahoo/news.py +258 -0
- webscout/search/engines/yahoo/suggestions.py +140 -0
- webscout/search/engines/yahoo/text.py +273 -0
- webscout/search/engines/yahoo/translate.py +16 -0
- webscout/search/engines/yahoo/videos.py +302 -0
- webscout/search/engines/yahoo/weather.py +220 -0
- webscout/search/http_client.py +1 -1
- webscout/search/yahoo_main.py +54 -0
- webscout/{auth → server}/__init__.py +2 -23
- webscout/server/config.py +84 -0
- webscout/{auth → server}/request_processing.py +3 -28
- webscout/{auth → server}/routes.py +14 -170
- webscout/server/schemas.py +23 -0
- webscout/{auth → server}/server.py +11 -43
- webscout/server/simple_logger.py +84 -0
- webscout/version.py +1 -1
- webscout/version.py.bak +1 -1
- webscout/zeroart/README.md +17 -9
- webscout/zeroart/__init__.py +78 -6
- webscout/zeroart/effects.py +51 -1
- webscout/zeroart/fonts.py +559 -1
- {webscout-2025.10.14.1.dist-info → webscout-2025.10.16.dist-info}/METADATA +15 -332
- {webscout-2025.10.14.1.dist-info → webscout-2025.10.16.dist-info}/RECORD +55 -48
- {webscout-2025.10.14.1.dist-info → webscout-2025.10.16.dist-info}/entry_points.txt +1 -1
- webscout/Bing_search.py +0 -417
- webscout/DWEBS.py +0 -529
- webscout/auth/api_key_manager.py +0 -189
- webscout/auth/auth_system.py +0 -85
- webscout/auth/config.py +0 -175
- webscout/auth/database.py +0 -755
- webscout/auth/middleware.py +0 -248
- webscout/auth/models.py +0 -185
- webscout/auth/rate_limiter.py +0 -254
- webscout/auth/schemas.py +0 -103
- webscout/auth/simple_logger.py +0 -236
- webscout/search/engines/bing.py +0 -84
- webscout/search/engines/bing_news.py +0 -52
- webscout/search/engines/yahoo.py +0 -65
- webscout/search/engines/yahoo_news.py +0 -64
- /webscout/{auth → server}/exceptions.py +0 -0
- /webscout/{auth → server}/providers.py +0 -0
- /webscout/{auth → server}/request_models.py +0 -0
- {webscout-2025.10.14.1.dist-info → webscout-2025.10.16.dist-info}/WHEEL +0 -0
- {webscout-2025.10.14.1.dist-info → webscout-2025.10.16.dist-info}/licenses/LICENSE.md +0 -0
- {webscout-2025.10.14.1.dist-info → webscout-2025.10.16.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Simple logger for no-auth mode.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import asyncio
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
|
+
from typing import Optional, Dict, Any
|
|
8
|
+
import sys
|
|
9
|
+
from webscout.Litlogger import Logger, LogLevel, LogFormat, ConsoleHandler
|
|
10
|
+
|
|
11
|
+
# Setup logger
|
|
12
|
+
logger = Logger(
|
|
13
|
+
name="webscout.api.simple_db",
|
|
14
|
+
level=LogLevel.INFO,
|
|
15
|
+
handlers=[ConsoleHandler(stream=sys.stdout)],
|
|
16
|
+
fmt=LogFormat.DEFAULT
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
class SimpleRequestLogger:
|
|
20
|
+
"""Simple request logger for no-auth mode."""
|
|
21
|
+
|
|
22
|
+
def __init__(self):
|
|
23
|
+
logger.info("Simple request logger initialized (no database).")
|
|
24
|
+
|
|
25
|
+
async def log_request(
|
|
26
|
+
self,
|
|
27
|
+
request_id: str,
|
|
28
|
+
ip_address: str,
|
|
29
|
+
model: str,
|
|
30
|
+
question: str,
|
|
31
|
+
answer: str,
|
|
32
|
+
**kwargs
|
|
33
|
+
) -> bool:
|
|
34
|
+
"""Logs request details to the console."""
|
|
35
|
+
logger.info(f"Request {request_id}: model={model}, ip={ip_address}")
|
|
36
|
+
return True
|
|
37
|
+
|
|
38
|
+
async def get_recent_requests(self, limit: int = 10) -> Dict[str, Any]:
|
|
39
|
+
"""Returns empty list of recent requests."""
|
|
40
|
+
logger.info("get_recent_requests called, but no database is configured.")
|
|
41
|
+
return {"requests": [], "count": 0}
|
|
42
|
+
|
|
43
|
+
async def get_stats(self) -> Dict[str, Any]:
|
|
44
|
+
"""Returns empty stats."""
|
|
45
|
+
logger.info("get_stats called, but no database is configured.")
|
|
46
|
+
return {"error": "No database configured.", "available": False}
|
|
47
|
+
|
|
48
|
+
# Global instance
|
|
49
|
+
request_logger = SimpleRequestLogger()
|
|
50
|
+
|
|
51
|
+
async def log_api_request(
|
|
52
|
+
request_id: str,
|
|
53
|
+
ip_address: str,
|
|
54
|
+
model: str,
|
|
55
|
+
question: str,
|
|
56
|
+
answer: str,
|
|
57
|
+
**kwargs
|
|
58
|
+
) -> bool:
|
|
59
|
+
"""Convenience function to log API requests."""
|
|
60
|
+
return await request_logger.log_request(
|
|
61
|
+
request_id=request_id,
|
|
62
|
+
ip_address=ip_address,
|
|
63
|
+
model=model,
|
|
64
|
+
question=question,
|
|
65
|
+
answer=answer,
|
|
66
|
+
**kwargs
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
def get_client_ip(request) -> str:
|
|
70
|
+
"""Extract client IP address from request."""
|
|
71
|
+
forwarded_for = request.headers.get("X-Forwarded-For")
|
|
72
|
+
if forwarded_for:
|
|
73
|
+
return forwarded_for.split(",")[0].strip()
|
|
74
|
+
|
|
75
|
+
real_ip = request.headers.get("X-Real-IP")
|
|
76
|
+
if real_ip:
|
|
77
|
+
return real_ip.strip()
|
|
78
|
+
|
|
79
|
+
return getattr(request.client, "host", "unknown")
|
|
80
|
+
|
|
81
|
+
def generate_request_id() -> str:
|
|
82
|
+
"""Generate a unique request ID."""
|
|
83
|
+
import uuid
|
|
84
|
+
return str(uuid.uuid4())
|
webscout/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "2025.10.
|
|
1
|
+
__version__ = "2025.10.16"
|
|
2
2
|
__prog__ = "webscout"
|
webscout/version.py.bak
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "2025.10.
|
|
1
|
+
__version__ = "2025.10.15"
|
|
2
2
|
__prog__ = "webscout"
|
webscout/zeroart/README.md
CHANGED
|
@@ -11,6 +11,9 @@ ZeroArt is a powerful, lightweight Python library for generating stunning ASCII
|
|
|
11
11
|
- Slant Font
|
|
12
12
|
- Neon Font
|
|
13
13
|
- Cyber Font
|
|
14
|
+
- 3D Font
|
|
15
|
+
- Electronic Font
|
|
16
|
+
- Isometric Font
|
|
14
17
|
|
|
15
18
|
- **Zero Dependencies**
|
|
16
19
|
- Completely standalone library
|
|
@@ -25,6 +28,8 @@ ZeroArt is a powerful, lightweight Python library for generating stunning ASCII
|
|
|
25
28
|
- Glitch effect
|
|
26
29
|
- Text wrapping
|
|
27
30
|
- Outline generation
|
|
31
|
+
- Gradient effect
|
|
32
|
+
- Bouncing effect
|
|
28
33
|
|
|
29
34
|
## 🛠 Installation
|
|
30
35
|
|
|
@@ -55,6 +60,9 @@ print(zeroart.figlet_format("AWESOME", font='block')) # Block style
|
|
|
55
60
|
print(zeroart.figlet_format("CODING", font='slant')) # Slant style
|
|
56
61
|
print(zeroart.figlet_format("NEON", font='neon')) # Neon style
|
|
57
62
|
print(zeroart.figlet_format("CYBER", font='cyber')) # Cyber style
|
|
63
|
+
print(zeroart.figlet_format("3D", font='3d')) # 3D style
|
|
64
|
+
print(zeroart.figlet_format("ELECTRONIC", font='electronic')) # Electronic style
|
|
65
|
+
print(zeroart.figlet_format("ISOMETRIC", font='isometric')) # Isometric style
|
|
58
66
|
```
|
|
59
67
|
|
|
60
68
|
### Text Effects
|
|
@@ -70,6 +78,12 @@ print(zeroart.glitch("GLITCH", font='cyber'))
|
|
|
70
78
|
|
|
71
79
|
# Outline effect
|
|
72
80
|
print(zeroart.outline("BORDER", font='block'))
|
|
81
|
+
|
|
82
|
+
# Gradient effect
|
|
83
|
+
print(zeroart.gradient("GRADIENT", font='3d'))
|
|
84
|
+
|
|
85
|
+
# Bouncing effect
|
|
86
|
+
print(zeroart.bounce("BOUNCE", font='electronic'))
|
|
73
87
|
```
|
|
74
88
|
|
|
75
89
|
## 🎨 Available Fonts
|
|
@@ -78,12 +92,6 @@ print(zeroart.outline("BORDER", font='block'))
|
|
|
78
92
|
2. **Slant Font**: Elegant, slanted text
|
|
79
93
|
3. **Neon Font**: Glowing, pixel-style art
|
|
80
94
|
4. **Cyber Font**: Cyberpunk-inspired rendering
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Contributions are welcome!
|
|
85
|
-
|
|
86
|
-
- Fork the repository
|
|
87
|
-
- Create a new font
|
|
88
|
-
- Add text effects
|
|
89
|
-
- Improve existing code
|
|
95
|
+
5. **3D Font**: Text with a 3D effect
|
|
96
|
+
6. **Electronic Font**: Digital-style text
|
|
97
|
+
7. **Isometric Font**: Text with an isometric perspective
|
webscout/zeroart/__init__.py
CHANGED
|
@@ -6,10 +6,10 @@ Create awesome ASCII art text without external dependencies!
|
|
|
6
6
|
|
|
7
7
|
from typing import Dict, List, Literal, Optional, Union
|
|
8
8
|
from .base import ZeroArtFont
|
|
9
|
-
from .fonts import BlockFont, SlantFont, NeonFont, CyberFont, DottedFont, ShadowFont
|
|
9
|
+
from .fonts import BlockFont, SlantFont, NeonFont, CyberFont, DottedFont, ShadowFont, ThreeDFont, ElectronicFont, IsometricFont
|
|
10
10
|
from .effects import AsciiArtEffects
|
|
11
11
|
|
|
12
|
-
FontType = Literal['block', 'slant', 'neon', 'cyber', 'dotted', 'shadow']
|
|
12
|
+
FontType = Literal['block', 'slant', 'neon', 'cyber', 'dotted', 'shadow', '3d', 'electronic', 'isometric']
|
|
13
13
|
|
|
14
14
|
def figlet_format(text: str, font: Union[str, ZeroArtFont] = 'block') -> str:
|
|
15
15
|
"""
|
|
@@ -25,7 +25,10 @@ def figlet_format(text: str, font: Union[str, ZeroArtFont] = 'block') -> str:
|
|
|
25
25
|
'neon': NeonFont(),
|
|
26
26
|
'cyber': CyberFont(),
|
|
27
27
|
'dotted': DottedFont(),
|
|
28
|
-
'shadow': ShadowFont()
|
|
28
|
+
'shadow': ShadowFont(),
|
|
29
|
+
'3d': ThreeDFont(),
|
|
30
|
+
'electronic': ElectronicFont(),
|
|
31
|
+
'isometric': IsometricFont()
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
if isinstance(font, str):
|
|
@@ -58,7 +61,10 @@ def rainbow(text: str, font: Union[str, ZeroArtFont] = 'block') -> str:
|
|
|
58
61
|
'neon': NeonFont(),
|
|
59
62
|
'cyber': CyberFont(),
|
|
60
63
|
'dotted': DottedFont(),
|
|
61
|
-
'shadow': ShadowFont()
|
|
64
|
+
'shadow': ShadowFont(),
|
|
65
|
+
'3d': ThreeDFont(),
|
|
66
|
+
'electronic': ElectronicFont(),
|
|
67
|
+
'isometric': IsometricFont()
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
if isinstance(font, str):
|
|
@@ -82,7 +88,10 @@ def glitch(text: str, font: Union[str, ZeroArtFont] = 'block', glitch_intensity:
|
|
|
82
88
|
'neon': NeonFont(),
|
|
83
89
|
'cyber': CyberFont(),
|
|
84
90
|
'dotted': DottedFont(),
|
|
85
|
-
'shadow': ShadowFont()
|
|
91
|
+
'shadow': ShadowFont(),
|
|
92
|
+
'3d': ThreeDFont(),
|
|
93
|
+
'electronic': ElectronicFont(),
|
|
94
|
+
'isometric': IsometricFont()
|
|
86
95
|
}
|
|
87
96
|
|
|
88
97
|
if isinstance(font, str):
|
|
@@ -108,7 +117,10 @@ def outline(text: str, font: Union[str, ZeroArtFont] = 'block', outline_char: st
|
|
|
108
117
|
'neon': NeonFont(),
|
|
109
118
|
'cyber': CyberFont(),
|
|
110
119
|
'dotted': DottedFont(),
|
|
111
|
-
'shadow': ShadowFont()
|
|
120
|
+
'shadow': ShadowFont(),
|
|
121
|
+
'3d': ThreeDFont(),
|
|
122
|
+
'electronic': ElectronicFont(),
|
|
123
|
+
'isometric': IsometricFont()
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
if isinstance(font, str):
|
|
@@ -117,6 +129,61 @@ def outline(text: str, font: Union[str, ZeroArtFont] = 'block', outline_char: st
|
|
|
117
129
|
selected_font = font
|
|
118
130
|
return AsciiArtEffects.outline_effect(text, selected_font, outline_char)
|
|
119
131
|
|
|
132
|
+
def gradient(text: str, font: Union[str, ZeroArtFont] = 'block', color1: tuple = (255, 0, 0), color2: tuple = (0, 0, 255)) -> str:
|
|
133
|
+
"""
|
|
134
|
+
Apply a gradient color effect to ASCII art
|
|
135
|
+
|
|
136
|
+
:param text: Text to render
|
|
137
|
+
:param font: Font style (default: 'block')
|
|
138
|
+
:param color1: Starting RGB color
|
|
139
|
+
:param color2: Ending RGB color
|
|
140
|
+
:return: Gradient-styled ASCII art
|
|
141
|
+
"""
|
|
142
|
+
font_map: Dict[str, ZeroArtFont] = {
|
|
143
|
+
'block': BlockFont(),
|
|
144
|
+
'slant': SlantFont(),
|
|
145
|
+
'neon': NeonFont(),
|
|
146
|
+
'cyber': CyberFont(),
|
|
147
|
+
'dotted': DottedFont(),
|
|
148
|
+
'shadow': ShadowFont(),
|
|
149
|
+
'3d': ThreeDFont(),
|
|
150
|
+
'electronic': ElectronicFont(),
|
|
151
|
+
'isometric': IsometricFont()
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if isinstance(font, str):
|
|
155
|
+
selected_font: ZeroArtFont = font_map.get(font.lower(), BlockFont())
|
|
156
|
+
else:
|
|
157
|
+
selected_font = font
|
|
158
|
+
return AsciiArtEffects.gradient_effect(text, selected_font, color1, color2)
|
|
159
|
+
|
|
160
|
+
def bounce(text: str, font: Union[str, ZeroArtFont] = 'block', bounce_height: int = 2) -> str:
|
|
161
|
+
"""
|
|
162
|
+
Create a bouncing text effect
|
|
163
|
+
|
|
164
|
+
:param text: Text to render
|
|
165
|
+
:param font: Font style (default: 'block')
|
|
166
|
+
:param bounce_height: Height of the bounce
|
|
167
|
+
:return: Bouncing ASCII art
|
|
168
|
+
"""
|
|
169
|
+
font_map: Dict[str, ZeroArtFont] = {
|
|
170
|
+
'block': BlockFont(),
|
|
171
|
+
'slant': SlantFont(),
|
|
172
|
+
'neon': NeonFont(),
|
|
173
|
+
'cyber': CyberFont(),
|
|
174
|
+
'dotted': DottedFont(),
|
|
175
|
+
'shadow': ShadowFont(),
|
|
176
|
+
'3d': ThreeDFont(),
|
|
177
|
+
'electronic': ElectronicFont(),
|
|
178
|
+
'isometric': IsometricFont()
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if isinstance(font, str):
|
|
182
|
+
selected_font: ZeroArtFont = font_map.get(font.lower(), BlockFont())
|
|
183
|
+
else:
|
|
184
|
+
selected_font = font
|
|
185
|
+
return AsciiArtEffects.bouncing_effect(text, selected_font, bounce_height)
|
|
186
|
+
|
|
120
187
|
__all__ = [
|
|
121
188
|
'figlet_format',
|
|
122
189
|
'print_figlet',
|
|
@@ -124,12 +191,17 @@ __all__ = [
|
|
|
124
191
|
'glitch',
|
|
125
192
|
'wrap_text',
|
|
126
193
|
'outline',
|
|
194
|
+
'gradient',
|
|
195
|
+
'bounce',
|
|
127
196
|
'BlockFont',
|
|
128
197
|
'SlantFont',
|
|
129
198
|
'NeonFont',
|
|
130
199
|
'CyberFont',
|
|
131
200
|
'DottedFont',
|
|
132
201
|
'ShadowFont',
|
|
202
|
+
'ThreeDFont',
|
|
203
|
+
'ElectronicFont',
|
|
204
|
+
'IsometricFont',
|
|
133
205
|
'ZeroArtFont',
|
|
134
206
|
'FontType'
|
|
135
207
|
]
|
webscout/zeroart/effects.py
CHANGED
|
@@ -98,4 +98,54 @@ class AsciiArtEffects:
|
|
|
98
98
|
|
|
99
99
|
top_bottom_line: str = outline_char * (len(outlined_lines[0]))
|
|
100
100
|
|
|
101
|
-
return '\n'.join([top_bottom_line] + outlined_lines + [top_bottom_line])
|
|
101
|
+
return '\n'.join([top_bottom_line] + outlined_lines + [top_bottom_line])
|
|
102
|
+
|
|
103
|
+
@staticmethod
|
|
104
|
+
def gradient_effect(text: str, font: ZeroArtFont, color1: tuple = (255, 0, 0), color2: tuple = (0, 0, 255)) -> str:
|
|
105
|
+
"""
|
|
106
|
+
Apply a gradient color effect to ASCII art
|
|
107
|
+
|
|
108
|
+
:param text: Text to render
|
|
109
|
+
:param font: Font to use
|
|
110
|
+
:param color1: Starting RGB color
|
|
111
|
+
:param color2: Ending RGB color
|
|
112
|
+
:return: Gradient-styled ASCII art
|
|
113
|
+
"""
|
|
114
|
+
art: str = font.render(text)
|
|
115
|
+
art_lines: List[str] = art.split('\n')
|
|
116
|
+
|
|
117
|
+
gradient_lines: List[str] = []
|
|
118
|
+
num_lines = len(art_lines)
|
|
119
|
+
|
|
120
|
+
for i, line in enumerate(art_lines):
|
|
121
|
+
# Calculate interpolated color
|
|
122
|
+
ratio = i / max(1, num_lines - 1)
|
|
123
|
+
r = int(color1[0] * (1 - ratio) + color2[0] * ratio)
|
|
124
|
+
g = int(color1[1] * (1 - ratio) + color2[1] * ratio)
|
|
125
|
+
b = int(color1[2] * (1 - ratio) + color2[2] * ratio)
|
|
126
|
+
|
|
127
|
+
# Apply ANSI color
|
|
128
|
+
colored_line = f'\033[38;2;{r};{g};{b}m{line}\033[0m'
|
|
129
|
+
gradient_lines.append(colored_line)
|
|
130
|
+
|
|
131
|
+
return '\n'.join(gradient_lines)
|
|
132
|
+
|
|
133
|
+
@staticmethod
|
|
134
|
+
def bouncing_effect(text: str, font: ZeroArtFont, bounce_height: int = 2) -> str:
|
|
135
|
+
"""
|
|
136
|
+
Create a bouncing text effect
|
|
137
|
+
|
|
138
|
+
:param text: Text to render
|
|
139
|
+
:param font: Font to use
|
|
140
|
+
:param bounce_height: Height of the bounce
|
|
141
|
+
:return: Bouncing ASCII art
|
|
142
|
+
"""
|
|
143
|
+
art: str = font.render(text)
|
|
144
|
+
art_lines: List[str] = art.split('\n')
|
|
145
|
+
|
|
146
|
+
bouncing_lines: List[str] = []
|
|
147
|
+
for i, line in enumerate(art_lines):
|
|
148
|
+
offset = abs(bounce_height - i % (2 * bounce_height))
|
|
149
|
+
bouncing_lines.append(" " * offset + line)
|
|
150
|
+
|
|
151
|
+
return '\n'.join(bouncing_lines)
|