webscout 6.4__py3-none-any.whl → 6.6__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.

Files changed (116) hide show
  1. webscout/AIutel.py +7 -54
  2. webscout/DWEBS.py +48 -26
  3. webscout/{YTdownloader.py → Extra/YTToolkit/YTdownloader.py} +990 -1103
  4. webscout/Extra/YTToolkit/__init__.py +3 -0
  5. webscout/{transcriber.py → Extra/YTToolkit/transcriber.py} +1 -1
  6. webscout/Extra/YTToolkit/ytapi/__init__.py +6 -0
  7. webscout/Extra/YTToolkit/ytapi/channel.py +307 -0
  8. webscout/Extra/YTToolkit/ytapi/errors.py +13 -0
  9. webscout/Extra/YTToolkit/ytapi/extras.py +45 -0
  10. webscout/Extra/YTToolkit/ytapi/https.py +88 -0
  11. webscout/Extra/YTToolkit/ytapi/patterns.py +61 -0
  12. webscout/Extra/YTToolkit/ytapi/playlist.py +59 -0
  13. webscout/Extra/YTToolkit/ytapi/pool.py +8 -0
  14. webscout/Extra/YTToolkit/ytapi/query.py +37 -0
  15. webscout/Extra/YTToolkit/ytapi/stream.py +60 -0
  16. webscout/Extra/YTToolkit/ytapi/utils.py +62 -0
  17. webscout/Extra/YTToolkit/ytapi/video.py +102 -0
  18. webscout/Extra/__init__.py +2 -1
  19. webscout/Extra/autocoder/autocoder_utiles.py +119 -101
  20. webscout/Extra/autocoder/rawdog.py +679 -680
  21. webscout/Extra/gguf.py +441 -441
  22. webscout/Extra/markdownlite/__init__.py +862 -0
  23. webscout/Extra/weather_ascii.py +2 -2
  24. webscout/Provider/AISEARCH/__init__.py +2 -0
  25. webscout/Provider/AISEARCH/ooai.py +155 -0
  26. webscout/Provider/Amigo.py +70 -85
  27. webscout/Provider/{prefind.py → Jadve.py} +72 -70
  28. webscout/Provider/Netwrck.py +235 -0
  29. webscout/Provider/Openai.py +4 -3
  30. webscout/Provider/PI.py +292 -221
  31. webscout/Provider/PizzaGPT.py +3 -3
  32. webscout/Provider/Reka.py +0 -1
  33. webscout/Provider/TTS/__init__.py +5 -1
  34. webscout/Provider/TTS/deepgram.py +183 -0
  35. webscout/Provider/TTS/elevenlabs.py +137 -0
  36. webscout/Provider/TTS/gesserit.py +151 -0
  37. webscout/Provider/TTS/murfai.py +139 -0
  38. webscout/Provider/TTS/parler.py +134 -107
  39. webscout/Provider/TTS/streamElements.py +360 -275
  40. webscout/Provider/TTS/utils.py +280 -0
  41. webscout/Provider/TTS/voicepod.py +116 -116
  42. webscout/Provider/TeachAnything.py +15 -2
  43. webscout/Provider/Youchat.py +42 -8
  44. webscout/Provider/__init__.py +8 -21
  45. webscout/Provider/meta.py +794 -779
  46. webscout/Provider/multichat.py +230 -0
  47. webscout/Provider/promptrefine.py +2 -2
  48. webscout/Provider/talkai.py +10 -13
  49. webscout/Provider/turboseek.py +5 -4
  50. webscout/Provider/tutorai.py +8 -112
  51. webscout/Provider/typegpt.py +5 -7
  52. webscout/Provider/x0gpt.py +81 -9
  53. webscout/Provider/yep.py +123 -361
  54. webscout/__init__.py +33 -28
  55. webscout/conversation.py +24 -9
  56. webscout/exceptions.py +188 -20
  57. webscout/litprinter/__init__.py +719 -831
  58. webscout/litprinter/colors.py +54 -0
  59. webscout/optimizers.py +420 -270
  60. webscout/prompt_manager.py +279 -279
  61. webscout/scout/__init__.py +8 -0
  62. webscout/scout/core/__init__.py +7 -0
  63. webscout/scout/core/crawler.py +140 -0
  64. webscout/scout/core/scout.py +571 -0
  65. webscout/scout/core/search_result.py +96 -0
  66. webscout/scout/core/text_analyzer.py +63 -0
  67. webscout/scout/core/text_utils.py +277 -0
  68. webscout/scout/core/web_analyzer.py +52 -0
  69. webscout/scout/core.py +884 -0
  70. webscout/scout/element.py +460 -0
  71. webscout/scout/parsers/__init__.py +69 -0
  72. webscout/scout/parsers/html5lib_parser.py +172 -0
  73. webscout/scout/parsers/html_parser.py +236 -0
  74. webscout/scout/parsers/lxml_parser.py +178 -0
  75. webscout/scout/utils.py +38 -0
  76. webscout/update_checker.py +184 -125
  77. webscout/version.py +1 -1
  78. webscout/zeroart/__init__.py +55 -0
  79. webscout/zeroart/base.py +60 -0
  80. webscout/zeroart/effects.py +99 -0
  81. webscout/zeroart/fonts.py +816 -0
  82. webscout/zerodir/__init__.py +225 -0
  83. {webscout-6.4.dist-info → webscout-6.6.dist-info}/METADATA +18 -231
  84. webscout-6.6.dist-info/RECORD +197 -0
  85. webscout-6.6.dist-info/top_level.txt +2 -0
  86. webstoken/__init__.py +30 -0
  87. webstoken/classifier.py +189 -0
  88. webstoken/keywords.py +216 -0
  89. webstoken/language.py +128 -0
  90. webstoken/ner.py +164 -0
  91. webstoken/normalizer.py +35 -0
  92. webstoken/processor.py +77 -0
  93. webstoken/sentiment.py +206 -0
  94. webstoken/stemmer.py +73 -0
  95. webstoken/t.py +75 -0
  96. webstoken/tagger.py +60 -0
  97. webstoken/tokenizer.py +158 -0
  98. webscout/Agents/Onlinesearcher.py +0 -182
  99. webscout/Agents/__init__.py +0 -2
  100. webscout/Agents/functioncall.py +0 -248
  101. webscout/Bing_search.py +0 -251
  102. webscout/Provider/Perplexity.py +0 -599
  103. webscout/Provider/RoboCoders.py +0 -206
  104. webscout/Provider/genspark.py +0 -225
  105. webscout/Provider/perplexitylabs.py +0 -265
  106. webscout/Provider/twitterclone.py +0 -251
  107. webscout/Provider/upstage.py +0 -230
  108. webscout/gpt4free.py +0 -666
  109. webscout/requestsHTMLfix.py +0 -775
  110. webscout/webai.py +0 -2590
  111. webscout-6.4.dist-info/RECORD +0 -154
  112. webscout-6.4.dist-info/top_level.txt +0 -1
  113. /webscout/Provider/{felo_search.py → AISEARCH/felo_search.py} +0 -0
  114. {webscout-6.4.dist-info → webscout-6.6.dist-info}/LICENSE.md +0 -0
  115. {webscout-6.4.dist-info → webscout-6.6.dist-info}/WHEEL +0 -0
  116. {webscout-6.4.dist-info → webscout-6.6.dist-info}/entry_points.txt +0 -0
@@ -1,279 +1,279 @@
1
- """
2
- HAI's Awesome Prompts! 🔥
3
- The most fire prompts collection you'll ever see! 💯
4
- Created by the legendary HAI squad! 👑
5
- """
6
-
7
- import os
8
- import json
9
- import logging
10
- import requests
11
- from typing import Optional, Dict, Union, List
12
- from rich.console import Console
13
- from rich.table import Table
14
- from rich.panel import Panel
15
- from datetime import datetime
16
-
17
- console = Console()
18
-
19
- class AwesomePrompts:
20
- """The most awesome prompts manager you'll ever see fr fr! 🔥"""
21
-
22
- def __init__(
23
- self,
24
- repo_url: str = "https://raw.githubusercontent.com/OE-LUCIFER/prompts/main/prompt.json",
25
- local_path: Optional[str] = None,
26
- auto_update: bool = True
27
- ):
28
- """Initialize them Awesome Prompts with style! 💫
29
-
30
- Args:
31
- repo_url (str): URL to fetch prompts from
32
- local_path (str, optional): Where to save them prompts locally
33
- auto_update (bool): Auto update prompts on init. Defaults to True
34
- """
35
- self.repo_url = repo_url
36
- self.local_path = local_path or os.path.join(
37
- os.path.expanduser("~"),
38
- ".webscout",
39
- "awesome-prompts.json"
40
- )
41
- self._cache: Dict[Union[str, int], str] = {}
42
- self._last_update: Optional[datetime] = None
43
-
44
- # Create directory if it doesn't exist
45
- os.makedirs(os.path.dirname(self.local_path), exist_ok=True)
46
-
47
- # Load those prompts on init if auto_update is True
48
- if auto_update:
49
- self.update_prompts_from_online()
50
-
51
- def _load_prompts(self) -> Dict[Union[str, int], str]:
52
- """Load prompts from the local file fr fr! 📂"""
53
- try:
54
- if os.path.exists(self.local_path):
55
- with open(self.local_path, 'r', encoding='utf-8') as f:
56
- return json.load(f)
57
- return {}
58
- except Exception as e:
59
- console.print(f"[red]❌ Error loading prompts: {str(e)}[/red]")
60
- return {}
61
-
62
- def _save_prompts(self, prompts: Dict[Union[str, int], str]) -> None:
63
- """Save them prompts with style! 💾"""
64
- try:
65
- with open(self.local_path, 'w', encoding='utf-8') as f:
66
- json.dump(prompts, f, indent=4, ensure_ascii=False)
67
- self._cache = prompts
68
- console.print("[green]✨ Prompts saved successfully![/green]")
69
- except Exception as e:
70
- console.print(f"[red]❌ Error saving prompts: {str(e)}[/red]")
71
-
72
- def update_prompts_from_online(self, force: bool = False) -> bool:
73
- """Update prompts from the repo! 🚀
74
-
75
- Args:
76
- force (bool): Force update even if recently updated
77
-
78
- Returns:
79
- bool: True if update successful
80
- """
81
- try:
82
- # Check if we need to update
83
- if not force and self._last_update and \
84
- (datetime.now() - self._last_update).total_seconds() < 3600:
85
- console.print("[yellow]⚡ Prompts are already up to date![/yellow]")
86
- return True
87
-
88
- console.print("[cyan]🔄 Updating prompts...[/cyan]")
89
- response = requests.get(self.repo_url, timeout=10)
90
- response.raise_for_status()
91
-
92
- # Merge new prompts with existing ones
93
- new_prompts = response.json()
94
- existing_prompts = self._load_prompts()
95
- merged_prompts = {**existing_prompts, **new_prompts}
96
-
97
- # Create a new dictionary for numeric indices
98
- indexed_prompts = merged_prompts.copy()
99
-
100
- # Add indices for numeric access
101
- for i, (key, value) in enumerate(list(merged_prompts.items())):
102
- if isinstance(key, str):
103
- indexed_prompts[i] = value
104
-
105
- self._save_prompts(indexed_prompts)
106
- self._last_update = datetime.now()
107
-
108
- console.print("[green]✨ Prompts updated successfully![/green]")
109
- return True
110
-
111
- except Exception as e:
112
- console.print(f"[red]❌ Error updating prompts: {str(e)}[/red]")
113
- return False
114
-
115
- def get_act(
116
- self,
117
- key: Union[str, int],
118
- default: Optional[str] = None,
119
- case_insensitive: bool = True
120
- ) -> Optional[str]:
121
- """Get that perfect prompt! 🎯
122
-
123
- Args:
124
- key: Prompt name or index
125
- default: Default value if not found
126
- case_insensitive: Match case exactly?
127
-
128
- Returns:
129
- str: The prompt or default value
130
- """
131
- prompts = self._cache or self._load_prompts()
132
-
133
- # Try direct access first
134
- if key in prompts:
135
- return prompts[key]
136
-
137
- # Try case-insensitive search for string keys
138
- if isinstance(key, str) and case_insensitive:
139
- key_lower = key.lower()
140
- for k, v in prompts.items():
141
- if isinstance(k, str) and k.lower() == key_lower:
142
- return v
143
-
144
- return default
145
-
146
- def add_prompt(self, name: str, prompt: str) -> bool:
147
- """Add a new prompt to the collection! ✨
148
-
149
- Args:
150
- name: Name of the prompt
151
- prompt: The prompt text
152
-
153
- Returns:
154
- bool: Success status
155
- """
156
- if not name or not prompt:
157
- console.print("[red]❌ Name and prompt cannot be empty![/red]")
158
- return False
159
-
160
- prompts = self._cache or self._load_prompts()
161
- prompts[name] = prompt
162
- self._save_prompts(prompts)
163
- return True
164
-
165
- def delete_prompt(
166
- self,
167
- name: Union[str, int],
168
- case_insensitive: bool = True,
169
- raise_not_found: bool = False
170
- ) -> bool:
171
- """Delete a prompt from the collection! 🗑️
172
-
173
- Args:
174
- name: Name or index of prompt to delete
175
- case_insensitive: Match case exactly?
176
- raise_not_found: Raise error if prompt not found?
177
-
178
- Returns:
179
- bool: Success status
180
- """
181
- prompts = self._cache or self._load_prompts()
182
-
183
- # Handle direct key match
184
- if name in prompts:
185
- del prompts[name]
186
- self._save_prompts(prompts)
187
- return True
188
-
189
- # Handle case-insensitive match
190
- if isinstance(name, str) and case_insensitive:
191
- name_lower = name.lower()
192
- for k in list(prompts.keys()):
193
- if isinstance(k, str) and k.lower() == name_lower:
194
- del prompts[k]
195
- self._save_prompts(prompts)
196
- return True
197
-
198
- if raise_not_found:
199
- raise KeyError(f"Prompt '{name}' not found!")
200
- console.print(f"[yellow]⚠️ Prompt '{name}' not found![/yellow]")
201
- return False
202
-
203
- @property
204
- def all_acts(self) -> Dict[Union[str, int], str]:
205
- """All them awesome prompts mapped with style! 📚
206
-
207
- Returns:
208
- dict: All prompts with their indices
209
- """
210
- prompts = self._cache or self._load_prompts()
211
- if not prompts:
212
- self.update_prompts_from_online()
213
- prompts = self._load_prompts()
214
-
215
- # Create a new dictionary for the result
216
- result = prompts.copy()
217
-
218
- # Add numeric indices to the copy
219
- for i, (key, value) in enumerate(list(prompts.items())):
220
- if isinstance(key, str):
221
- result[i] = value
222
-
223
- return result
224
-
225
- def show_acts(self, search: Optional[str] = None) -> None:
226
- """Show all them awesome prompts with style! 📋
227
-
228
- Args:
229
- search: Optional search term to filter prompts
230
- """
231
- prompts = self.all_acts
232
-
233
- # Create a fire table! 🔥
234
- table = Table(
235
- title="🚀 Awesome Prompts Collection",
236
- show_header=True,
237
- header_style="bold magenta"
238
- )
239
- table.add_column("Index", style="cyan", justify="right")
240
- table.add_column("Name", style="green")
241
- table.add_column("Preview", style="yellow")
242
-
243
- for i, (key, value) in enumerate(prompts.items()):
244
- if isinstance(key, int):
245
- continue # Skip numeric keys as they're duplicates
246
-
247
- # Filter by search term if provided
248
- if search and search.lower() not in key.lower() and \
249
- search.lower() not in value.lower():
250
- continue
251
-
252
- preview = value[:50] + "..." if len(value) > 50 else value
253
- table.add_row(str(i), str(key), preview)
254
-
255
- console.print(table)
256
-
257
- def get_random_act(self) -> Optional[str]:
258
- """Get a random prompt for that surprise factor! 🎲"""
259
- import random
260
- prompts = self.all_acts
261
- string_keys = [k for k in prompts.keys() if isinstance(k, str)]
262
- if not string_keys:
263
- return None
264
- return prompts[random.choice(string_keys)]
265
-
266
- if __name__ == "__main__":
267
- # Quick demo of the features! 🚀
268
- prompts = AwesomePrompts()
269
- prompts.update_prompts_from_online()
270
- prompts.show_acts()
271
-
272
- # Add a test prompt
273
- prompts.add_prompt("test_prompt", "This is a test prompt! 🔥")
274
-
275
- # Show the new prompt
276
- print("\nTest Prompt:", prompts.get_act("test_prompt"))
277
-
278
- # Clean up
279
- prompts.delete_prompt("test_prompt")
1
+ """
2
+ HAI's Awesome Prompts! 🔥
3
+ The most fire prompts collection you'll ever see! 💯
4
+ Created by the legendary HAI squad! 👑
5
+ """
6
+
7
+ import os
8
+ import json
9
+ import logging
10
+ import requests
11
+ from typing import Optional, Dict, Union, List
12
+ from rich.console import Console
13
+ from rich.table import Table
14
+ from rich.panel import Panel
15
+ from datetime import datetime
16
+
17
+ console = Console()
18
+
19
+ class AwesomePrompts:
20
+ """The most awesome prompts manager you'll ever see fr fr! 🔥"""
21
+
22
+ def __init__(
23
+ self,
24
+ repo_url: str = "https://raw.githubusercontent.com/OE-LUCIFER/prompts/main/prompt.json",
25
+ local_path: Optional[str] = None,
26
+ auto_update: bool = True
27
+ ):
28
+ """Initialize them Awesome Prompts with style! 💫
29
+
30
+ Args:
31
+ repo_url (str): URL to fetch prompts from
32
+ local_path (str, optional): Where to save them prompts locally
33
+ auto_update (bool): Auto update prompts on init. Defaults to True
34
+ """
35
+ self.repo_url = repo_url
36
+ self.local_path = local_path or os.path.join(
37
+ os.path.expanduser("~"),
38
+ ".webscout",
39
+ "awesome-prompts.json"
40
+ )
41
+ self._cache: Dict[Union[str, int], str] = {}
42
+ self._last_update: Optional[datetime] = None
43
+
44
+ # Create directory if it doesn't exist
45
+ os.makedirs(os.path.dirname(self.local_path), exist_ok=True)
46
+
47
+ # Load those prompts on init if auto_update is True
48
+ if auto_update:
49
+ self.update_prompts_from_online()
50
+
51
+ def _load_prompts(self) -> Dict[Union[str, int], str]:
52
+ """Load prompts from the local file fr fr! 📂"""
53
+ try:
54
+ if os.path.exists(self.local_path):
55
+ with open(self.local_path, 'r', encoding='utf-8') as f:
56
+ return json.load(f)
57
+ return {}
58
+ except Exception as e:
59
+ console.print(f"[red]❌ Error loading prompts: {str(e)}[/red]")
60
+ return {}
61
+
62
+ def _save_prompts(self, prompts: Dict[Union[str, int], str]) -> None:
63
+ """Save them prompts with style! 💾"""
64
+ try:
65
+ with open(self.local_path, 'w', encoding='utf-8') as f:
66
+ json.dump(prompts, f, indent=4, ensure_ascii=False)
67
+ self._cache = prompts
68
+ console.print("[green]✨ Prompts saved successfully![/green]")
69
+ except Exception as e:
70
+ console.print(f"[red]❌ Error saving prompts: {str(e)}[/red]")
71
+
72
+ def update_prompts_from_online(self, force: bool = False) -> bool:
73
+ """Update prompts from the repo! 🚀
74
+
75
+ Args:
76
+ force (bool): Force update even if recently updated
77
+
78
+ Returns:
79
+ bool: True if update successful
80
+ """
81
+ try:
82
+ # Check if we need to update
83
+ if not force and self._last_update and \
84
+ (datetime.now() - self._last_update).total_seconds() < 3600:
85
+ console.print("[yellow]⚡ Prompts are already up to date![/yellow]")
86
+ return True
87
+
88
+ console.print("[cyan]🔄 Updating prompts...[/cyan]")
89
+ response = requests.get(self.repo_url, timeout=10)
90
+ response.raise_for_status()
91
+
92
+ # Merge new prompts with existing ones
93
+ new_prompts = response.json()
94
+ existing_prompts = self._load_prompts()
95
+ merged_prompts = {**existing_prompts, **new_prompts}
96
+
97
+ # Create a new dictionary for numeric indices
98
+ indexed_prompts = merged_prompts.copy()
99
+
100
+ # Add indices for numeric access
101
+ for i, (key, value) in enumerate(list(merged_prompts.items())):
102
+ if isinstance(key, str):
103
+ indexed_prompts[i] = value
104
+
105
+ self._save_prompts(indexed_prompts)
106
+ self._last_update = datetime.now()
107
+
108
+ console.print("[green]✨ Prompts updated successfully![/green]")
109
+ return True
110
+
111
+ except Exception as e:
112
+ console.print(f"[red]❌ Error updating prompts: {str(e)}[/red]")
113
+ return False
114
+
115
+ def get_act(
116
+ self,
117
+ key: Union[str, int],
118
+ default: Optional[str] = None,
119
+ case_insensitive: bool = True
120
+ ) -> Optional[str]:
121
+ """Get that perfect prompt! 🎯
122
+
123
+ Args:
124
+ key: Prompt name or index
125
+ default: Default value if not found
126
+ case_insensitive: Match case exactly?
127
+
128
+ Returns:
129
+ str: The prompt or default value
130
+ """
131
+ prompts = self._cache or self._load_prompts()
132
+
133
+ # Try direct access first
134
+ if key in prompts:
135
+ return prompts[key]
136
+
137
+ # Try case-insensitive search for string keys
138
+ if isinstance(key, str) and case_insensitive:
139
+ key_lower = key.lower()
140
+ for k, v in prompts.items():
141
+ if isinstance(k, str) and k.lower() == key_lower:
142
+ return v
143
+
144
+ return default
145
+
146
+ def add_prompt(self, name: str, prompt: str) -> bool:
147
+ """Add a new prompt to the collection! ✨
148
+
149
+ Args:
150
+ name: Name of the prompt
151
+ prompt: The prompt text
152
+
153
+ Returns:
154
+ bool: Success status
155
+ """
156
+ if not name or not prompt:
157
+ console.print("[red]❌ Name and prompt cannot be empty![/red]")
158
+ return False
159
+
160
+ prompts = self._cache or self._load_prompts()
161
+ prompts[name] = prompt
162
+ self._save_prompts(prompts)
163
+ return True
164
+
165
+ def delete_prompt(
166
+ self,
167
+ name: Union[str, int],
168
+ case_insensitive: bool = True,
169
+ raise_not_found: bool = False
170
+ ) -> bool:
171
+ """Delete a prompt from the collection! 🗑️
172
+
173
+ Args:
174
+ name: Name or index of prompt to delete
175
+ case_insensitive: Match case exactly?
176
+ raise_not_found: Raise error if prompt not found?
177
+
178
+ Returns:
179
+ bool: Success status
180
+ """
181
+ prompts = self._cache or self._load_prompts()
182
+
183
+ # Handle direct key match
184
+ if name in prompts:
185
+ del prompts[name]
186
+ self._save_prompts(prompts)
187
+ return True
188
+
189
+ # Handle case-insensitive match
190
+ if isinstance(name, str) and case_insensitive:
191
+ name_lower = name.lower()
192
+ for k in list(prompts.keys()):
193
+ if isinstance(k, str) and k.lower() == name_lower:
194
+ del prompts[k]
195
+ self._save_prompts(prompts)
196
+ return True
197
+
198
+ if raise_not_found:
199
+ raise KeyError(f"Prompt '{name}' not found!")
200
+ console.print(f"[yellow]⚠️ Prompt '{name}' not found![/yellow]")
201
+ return False
202
+
203
+ @property
204
+ def all_acts(self) -> Dict[Union[str, int], str]:
205
+ """All them awesome prompts mapped with style! 📚
206
+
207
+ Returns:
208
+ dict: All prompts with their indices
209
+ """
210
+ prompts = self._cache or self._load_prompts()
211
+ if not prompts:
212
+ self.update_prompts_from_online()
213
+ prompts = self._load_prompts()
214
+
215
+ # Create a new dictionary for the result
216
+ result = prompts.copy()
217
+
218
+ # Add numeric indices to the copy
219
+ for i, (key, value) in enumerate(list(prompts.items())):
220
+ if isinstance(key, str):
221
+ result[i] = value
222
+
223
+ return result
224
+
225
+ def show_acts(self, search: Optional[str] = None) -> None:
226
+ """Show all them awesome prompts with style! 📋
227
+
228
+ Args:
229
+ search: Optional search term to filter prompts
230
+ """
231
+ prompts = self.all_acts
232
+
233
+ # Create a fire table! 🔥
234
+ table = Table(
235
+ title="🚀 Awesome Prompts Collection",
236
+ show_header=True,
237
+ header_style="bold magenta"
238
+ )
239
+ table.add_column("Index", style="cyan", justify="right")
240
+ table.add_column("Name", style="green")
241
+ table.add_column("Preview", style="yellow")
242
+
243
+ for i, (key, value) in enumerate(prompts.items()):
244
+ if isinstance(key, int):
245
+ continue # Skip numeric keys as they're duplicates
246
+
247
+ # Filter by search term if provided
248
+ if search and search.lower() not in key.lower() and \
249
+ search.lower() not in value.lower():
250
+ continue
251
+
252
+ preview = value[:50] + "..." if len(value) > 50 else value
253
+ table.add_row(str(i), str(key), preview)
254
+
255
+ console.print(table)
256
+
257
+ def get_random_act(self) -> Optional[str]:
258
+ """Get a random prompt for that surprise factor! 🎲"""
259
+ import random
260
+ prompts = self.all_acts
261
+ string_keys = [k for k in prompts.keys() if isinstance(k, str)]
262
+ if not string_keys:
263
+ return None
264
+ return prompts[random.choice(string_keys)]
265
+
266
+ if __name__ == "__main__":
267
+ # Quick demo of the features! 🚀
268
+ prompts = AwesomePrompts()
269
+ prompts.update_prompts_from_online()
270
+ prompts.show_acts()
271
+
272
+ # Add a test prompt
273
+ prompts.add_prompt("test_prompt", "This is a test prompt! 🔥")
274
+
275
+ # Show the new prompt
276
+ print("\nTest Prompt:", prompts.get_act("test_prompt"))
277
+
278
+ # Clean up
279
+ prompts.delete_prompt("test_prompt")
@@ -0,0 +1,8 @@
1
+ """
2
+ Scout: A powerful, zero-dependency web scraping library
3
+ """
4
+
5
+ from .core import Scout, ScoutCrawler, ScoutTextAnalyzer, ScoutWebAnalyzer, ScoutSearchResult
6
+ from .element import Tag, NavigableString
7
+
8
+ __all__ = ['Scout', 'ScoutCrawler', 'Tag', 'NavigableString','ScoutTextAnalyzer', 'ScoutWebAnalyzer', 'ScoutSearchResult']
@@ -0,0 +1,7 @@
1
+ from .text_analyzer import ScoutTextAnalyzer
2
+ from .web_analyzer import ScoutWebAnalyzer
3
+ from .search_result import ScoutSearchResult
4
+ from .crawler import ScoutCrawler
5
+ from .scout import Scout
6
+
7
+ __all__ = ['ScoutTextAnalyzer', 'ScoutWebAnalyzer', 'ScoutSearchResult', 'ScoutCrawler', 'Scout']