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

@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: webscout
3
- Version: 1.2.1
4
- Summary: Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com, yep.com, phind.com, you.com, etc Also containes AI models
3
+ Version: 1.2.3
4
+ Summary: Search for words, documents, images, videos, news, maps and text translation using the Google, DuckDuckGo.com, yep.com, phind.com, you.com, etc Also containes AI models
5
5
  Author: OEvortex
6
6
  Author-email: helpingai5@gmail.com
7
7
  License: HelpingAI Simplified Universal License
@@ -37,6 +37,14 @@ Requires-Dist: g4f >=0.2.2.3
37
37
  Requires-Dist: rich
38
38
  Requires-Dist: python-dotenv
39
39
  Requires-Dist: Helpingai-T2
40
+ Requires-Dist: beautifulsoup4
41
+ Requires-Dist: markdownify
42
+ Requires-Dist: pydantic
43
+ Requires-Dist: requests
44
+ Requires-Dist: sse-starlette
45
+ Requires-Dist: termcolor
46
+ Requires-Dist: tiktoken
47
+ Requires-Dist: tldextract
40
48
  Provides-Extra: dev
41
49
  Requires-Dist: ruff >=0.1.6 ; extra == 'dev'
42
50
  Requires-Dist: pytest >=7.4.2 ; extra == 'dev'
@@ -47,33 +55,22 @@ Requires-Dist: pytest >=7.4.2 ; extra == 'dev'
47
55
  <a href="#"><img alt="Python version" src="https://img.shields.io/pypi/pyversions/webscout"/></a>
48
56
  <a href="https://pepy.tech/project/webscout"><img alt="Downloads" src="https://static.pepy.tech/badge/webscout"></a>
49
57
 
50
- Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com, yep.com, phind.com, you.com, etc also contains AI models
58
+ Search for words, documents, images, videos, news, maps and text translation using the Google, DuckDuckGo.com, yep.com, phind.com, you.com, etc Also containes AI models
51
59
  Also containes AI models that you can use
52
- **⚠️ Warning: use AsyncWEBS in asynchronous code**
60
+
53
61
 
54
62
  ## Table of Contents
55
63
  - [webscout](#webscout)
56
64
  - [Table of Contents](#table-of-contents)
57
65
  - [Install](#install)
58
- - [Webscout API Server](#webscout-api-server)
59
- - [Installation](#installation)
60
- - [Usage](#usage)
61
- - [Text Search](#text-search)
62
- - [Image Search](#image-search)
63
- - [Video Search](#video-search)
64
- - [News Search](#news-search)
65
- - [Map Search](#map-search)
66
- - [Translation](#translation)
67
- - [Suggestions](#suggestions)
68
- - [Health Check](#health-check)
69
- - [Response Format](#response-format)
70
- - [Error Handling](#error-handling)
71
- - [License](#license)
72
- - [IN python projects](#in-python-projects)
73
66
  - [CLI version](#cli-version)
74
67
  - [CLI version of webscout.AI](#cli-version-of-webscoutai)
75
68
  - [CLI to use LLM](#cli-to-use-llm)
76
69
  - [Regions](#regions)
70
+ - [DeepWEBS: Advanced Web Searches](#deepwebs-advanced-web-searches)
71
+ - [Activating DeepWEBS](#activating-deepwebs)
72
+ - [Point to remember before using `DeepWEBS`](#point-to-remember-before-using-deepwebs)
73
+ - [Usage Example](#usage-example)
77
74
  - [WEBS and AsyncWEBS classes](#webs-and-asyncwebs-classes)
78
75
  - [Exceptions](#exceptions)
79
76
  - [usage of webscout](#usage-of-webscout)
@@ -102,153 +99,6 @@ Also containes AI models that you can use
102
99
  ```python
103
100
  pip install -U webscout
104
101
  ```
105
- # Webscout API Server
106
-
107
- This is a Flask server that provides an API for performing various types of searches using the `webscout` Python package. The server supports text, answers, images, videos, news, maps, translation, and suggestions searches.
108
-
109
- ## Installation
110
-
111
- 1. Install the required dependencies:
112
-
113
- ```bash
114
- pip install flask webscout
115
- ```
116
-
117
- 2. Clone or download the repository containing the server code.
118
-
119
- ## Usage
120
-
121
- 1. Run the server:
122
-
123
- ```bash
124
- python server.py
125
- ```
126
-
127
- This will start the Flask server at `http://localhost:5000`.
128
-
129
- 2. Use the API endpoints to perform searches. Here are the available endpoints:
130
-
131
- ### Text Search
132
-
133
- `GET /api/search`
134
-
135
- Parameters:
136
- - `q` (required): The search query string.
137
- - `max_results` (optional, default=10): The maximum number of results to return.
138
- - `timelimit` (optional): The time limit for the search (e.g., 'd' for day, 'w' for week, 'm' for month, 'y' for year).
139
- - `safesearch` (optional, default='moderate'): The safe search level ('on', 'moderate', or 'off').
140
- - `region` (optional, default='wt-wt'): The region for the search (e.g., 'us-en', 'uk-en', 'ru-ru').
141
-
142
- Example: `http://localhost:5000/api/search?q=python&max_results=20&timelimit=d&safesearch=off&region=us-en`
143
-
144
-
145
- ### Image Search
146
-
147
- `GET /api/images`
148
-
149
- Parameters:
150
- - `q` (required): The search query string.
151
- - `max_results` (optional, default=10): The maximum number of results to return.
152
- - `safesearch` (optional, default='moderate'): The safe search level ('on', 'moderate', or 'off').
153
- - `region` (optional, default='wt-wt'): The region for the search (e.g., 'us-en', 'uk-en', 'ru-ru').
154
-
155
- Example: `http://localhost:5000/api/images?q=butterfly&max_results=15&safesearch=off&region=uk-en`
156
-
157
- ### Video Search
158
-
159
- `GET /api/videos`
160
-
161
- Parameters:
162
- - `q` (required): The search query string.
163
- - `max_results` (optional, default=10): The maximum number of results to return.
164
- - `safesearch` (optional, default='moderate'): The safe search level ('on', 'moderate', or 'off').
165
- - `region` (optional, default='wt-wt'): The region for the search (e.g., 'us-en', 'uk-en', 'ru-ru').
166
- - `timelimit` (optional): The time limit for the search (e.g., 'd' for day, 'w' for week, 'm' for month).
167
- - `duration` (optional): The duration of the videos ('short', 'medium', 'long').
168
-
169
- Example: `http://localhost:5000/api/videos?q=tesla&max_results=20&safesearch=off&region=us-en&timelimit=m&duration=long`
170
-
171
- ### News Search
172
-
173
- `GET /api/news`
174
-
175
- Parameters:
176
- - `q` (required): The search query string.
177
- - `max_results` (optional, default=10): The maximum number of results to return.
178
- - `safesearch` (optional, default='moderate'): The safe search level ('on', 'moderate', or 'off').
179
- - `region` (optional, default='wt-wt'): The region for the search (e.g., 'us-en', 'uk-en', 'ru-ru').
180
- - `timelimit` (optional): The time limit for the search (e.g., 'd' for day, 'w' for week, 'm' for month).
181
-
182
- Example: `http://localhost:5000/api/news?q=sports&max_results=20&safesearch=on&region=uk-en&timelimit=d`
183
-
184
- ### Map Search
185
-
186
- `GET /api/maps`
187
-
188
- Parameters:
189
- - `q` (required): The search query string.
190
- - `place` (optional): The place for the search (e.g., 'New York City').
191
- - `max_results` (optional, default=10): The maximum number of results to return.
192
-
193
- Example: `http://localhost:5000/api/maps?q=restaurants&place=Anantnag&max_results=15`
194
-
195
- ### Translation
196
-
197
- `GET /api/translate`
198
-
199
- Parameters:
200
- - `q` (required): The text to translate.
201
- - `to` (optional, default='en'): The language to translate to (e.g., 'es', 'fr', 'hi').
202
-
203
- Example: `http://localhost:5000/api/translate?q=hello&to=es`
204
-
205
- ### Suggestions
206
-
207
- `GET /api/suggestions`
208
-
209
- Parameters:
210
- - `q` (required): The query string for suggestions.
211
-
212
- Example: `http://localhost:5000/api/suggestions?q=python`
213
-
214
- ### Health Check
215
-
216
- `GET /api/health`
217
-
218
- This endpoint returns a simple JSON response indicating that the server is running and ready to accept requests.
219
-
220
- Example: `http://localhost:5000/api/health`
221
-
222
- ## Response Format
223
-
224
- All endpoints return JSON responses with the following format:
225
-
226
- ```json
227
- {
228
- "results": [
229
- {...},
230
- {...},
231
- ...
232
- ]
233
- }
234
- ```
235
-
236
- The `results` key contains a list of search results, where each result is a dictionary containing the relevant information for that search type.
237
-
238
- ## Error Handling
239
-
240
- If an error occurs during the search, the server will return a JSON response with an appropriate error message.
241
-
242
- ```json
243
- {
244
- "error": "Error message"
245
- }
246
- ```
247
-
248
- ## License
249
-
250
- This project is licensed under the [HelpingAI Simplified Universal License](https://raw.githubusercontent.com/OE-LUCIFER/Webscout/main/LICENSE.md).
251
- # IN python projects
252
102
  ## CLI version
253
103
 
254
104
  ```python3
@@ -366,6 +216,71 @@ ___
366
216
  [Go To TOP](#TOP)
367
217
 
368
218
 
219
+
220
+ ## DeepWEBS: Advanced Web Searches
221
+
222
+ `DeepWEBS` is a standalone feature designed to perform advanced web searches with enhanced capabilities. It is particularly powerful in extracting relevant information directly from webpages and Search engine, focusing exclusively on text (web) searches. Unlike the `WEBS` , which provides a broader range of search functionalities, `DeepWEBS` is specifically tailored for in-depth web searches.
223
+
224
+ ### Activating DeepWEBS
225
+
226
+ To utilize the `DeepWEBS` feature, you must first create an instance of the `DeepWEBS` . This is designed to be used independently of the `WEBS` , offering a focused approach to web searches.
227
+
228
+ ### Point to remember before using `DeepWEBS`
229
+ As `DeepWEBS` is designed to extract relevant information directly from webpages and Search engine, It extracts html from webpages and saves them to folder named files in `DeepWEBS` that can be found at `C:\Users\Username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\DeepWEBS`
230
+
231
+ ### Usage Example
232
+
233
+ Here's a basic example of how to use the `DeepWEBS` :
234
+ ```python
235
+ from webscout import DeepWEBS
236
+
237
+ def perform_web_search(query):
238
+ # Initialize the DeepWEBS class
239
+ D = DeepWEBS()
240
+
241
+ # Set up the search parameters
242
+ search_params = D.DeepSearch(
243
+ queries=[query], # Query to search
244
+ result_num=5, # Number of search results
245
+ safe=True, # Enable SafeSearch
246
+ types=["web"], # Search type: web
247
+ extract_webpage=True, # True for extracting webpages
248
+ overwrite_query_html=False,
249
+ overwrite_webpage_html=False,
250
+ )
251
+
252
+ # Execute the search and retrieve results
253
+ results = D.queries_to_search_results(search_params)
254
+
255
+ return results
256
+
257
+ def print_search_results(results):
258
+ """
259
+ Print the search results.
260
+
261
+ Args:
262
+ - search_results (list): List of search results to print.
263
+ """
264
+ if results:
265
+ for index, result in enumerate(results, start=1):
266
+ print(f"Result {index}: {result}")
267
+ else:
268
+ print("No search results found.")
269
+
270
+ def main():
271
+ # Prompt the user for a search query
272
+ query = input("Enter your search query: ")
273
+
274
+ # Perform the web search
275
+ results = perform_web_search(query)
276
+
277
+ # Print the search results
278
+ print_search_results(results)
279
+
280
+ if __name__ == "__main__":
281
+ main()
282
+
283
+ ```
369
284
  ## WEBS and AsyncWEBS classes
370
285
 
371
286
  The WEBS and AsyncWEBS classes are used to retrieve search results from DuckDuckGo.com and yep.com periodically.
@@ -0,0 +1,33 @@
1
+ DeepWEBS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ DeepWEBS/documents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ DeepWEBS/documents/query_results_extractor.py,sha256=whd0NKLpcxW_6q3SkBOhMukr1K_c1PPYN92rf5EHRPM,4049
4
+ DeepWEBS/documents/webpage_content_extractor.py,sha256=P4yHCkPTiBvMbORd8SKVt64rQFPJuj3iixcQoRU34Lw,5272
5
+ DeepWEBS/networks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ DeepWEBS/networks/filepath_converter.py,sha256=JKMBew1TYe4TVoGTqgTWerq2Pam49_9u9TVUFCTDQyk,3183
7
+ DeepWEBS/networks/google_searcher.py,sha256=-AdIpVkRgemsARnOt8WPkF2Id1baVlqDHyqX2qz8Aew,1966
8
+ DeepWEBS/networks/network_configs.py,sha256=-Hb78_7SBx32h219FnU14qcHTvBdDUf_QAU6-RTL_e0,726
9
+ DeepWEBS/networks/webpage_fetcher.py,sha256=d5paDTB3wa_w6YWmLV7RkpAj8Lh8ztuUuyfe8RuTjQg,3846
10
+ DeepWEBS/utilsdw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ DeepWEBS/utilsdw/enver.py,sha256=vstxg_5P3Rwo1en6oPcuc2SBiATJqxi4C7meGmw5w0M,1754
12
+ DeepWEBS/utilsdw/logger.py,sha256=Z0nFUcEGyU8r28yKiIyvEtO26xxpmJgbvNToTfwZecc,8174
13
+ webscout/AI.py,sha256=CwUCeGnNRL9STd5bAZSyIiLysorBMu065HrkY8UCzAQ,49618
14
+ webscout/AIbase.py,sha256=vQi2ougu5bG-QdmoYmxCQsOg7KTEgG7EF6nZh5qqUGw,2343
15
+ webscout/AIutel.py,sha256=cvsuw57hq3GirAiT-PjqwhAiLPf1urOzDb2szJ4bwmo,24124
16
+ webscout/DWEBS.py,sha256=f1mZntTvClJOn8q7jUdQZAkp4Op3zR7L7j4KRPNHlgY,7135
17
+ webscout/HelpingAI.py,sha256=YeZw0zYVHMcBFFPNdd3_Ghpm9ebt_EScQjHO_IIs4lg,8103
18
+ webscout/LLM.py,sha256=XByJPiATLA_57FBWKw18Xx_PGRCPOj-GJE96aQH1k2Y,3309
19
+ webscout/__init__.py,sha256=wRx1a7Jo-Vs9VwCq1ib5VEf2OeKK4qbtK1DaWu7Oj_s,425
20
+ webscout/__main__.py,sha256=ZtTRgsRjUi2JOvYFLF1ZCh55Sdoz94I-BS-TlJC7WDU,126
21
+ webscout/cli.py,sha256=F888fdrFUQgczMBN4yMOSf6Nh-IbvkqpPhDsbnA2FtQ,17059
22
+ webscout/exceptions.py,sha256=4AOO5wexeL96nvUS-badcckcwrPS7UpZyAgB9vknHZE,276
23
+ webscout/models.py,sha256=5iQIdtedT18YuTZ3npoG7kLMwcrKwhQ7928dl_7qZW0,692
24
+ webscout/utils.py,sha256=c_98M4oqpb54pUun3fpGGlCerFD6ZHUbghyp5b7Mwgo,2605
25
+ webscout/version.py,sha256=IzQz-3tdiLwn4VJnIg8k0a-2MLPMIr0xmpR5acmHp4Q,25
26
+ webscout/webscout_search.py,sha256=3_lli-hDb8_kCGwscK29xuUcOS833ROgpNhDzrxh0dk,3085
27
+ webscout/webscout_search_async.py,sha256=Y5frH0k3hLqBCR-8dn7a_b7EvxdYxn6wHiKl3jWosE0,40670
28
+ webscout-1.2.3.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
29
+ webscout-1.2.3.dist-info/METADATA,sha256=8qdgb7E9qLjKkmgQ_dOouLcZ1_8WMR-_RgdXCb52mTQ,21774
30
+ webscout-1.2.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
31
+ webscout-1.2.3.dist-info/entry_points.txt,sha256=8-93eRslYrzTHs5E-6yFRJrve00C9q-SkXJD113jzRY,197
32
+ webscout-1.2.3.dist-info/top_level.txt,sha256=OD5YKy6Y3hldL7SmuxsiEDxAG4LgdSSWwzYk22MF9fk,18
33
+ webscout-1.2.3.dist-info/RECORD,,
@@ -1 +1,2 @@
1
+ DeepWEBS
1
2
  webscout
@@ -1,20 +0,0 @@
1
- webscout/AI.py,sha256=CwUCeGnNRL9STd5bAZSyIiLysorBMu065HrkY8UCzAQ,49618
2
- webscout/AIbase.py,sha256=vQi2ougu5bG-QdmoYmxCQsOg7KTEgG7EF6nZh5qqUGw,2343
3
- webscout/AIutel.py,sha256=cvsuw57hq3GirAiT-PjqwhAiLPf1urOzDb2szJ4bwmo,24124
4
- webscout/HelpingAI.py,sha256=YeZw0zYVHMcBFFPNdd3_Ghpm9ebt_EScQjHO_IIs4lg,8103
5
- webscout/LLM.py,sha256=XByJPiATLA_57FBWKw18Xx_PGRCPOj-GJE96aQH1k2Y,3309
6
- webscout/__init__.py,sha256=RrvYG33maRS0U7J-M99FroQLzVkt_gxDJ6WZ0_BkmTk,398
7
- webscout/__main__.py,sha256=ZtTRgsRjUi2JOvYFLF1ZCh55Sdoz94I-BS-TlJC7WDU,126
8
- webscout/cli.py,sha256=F888fdrFUQgczMBN4yMOSf6Nh-IbvkqpPhDsbnA2FtQ,17059
9
- webscout/exceptions.py,sha256=4AOO5wexeL96nvUS-badcckcwrPS7UpZyAgB9vknHZE,276
10
- webscout/models.py,sha256=5iQIdtedT18YuTZ3npoG7kLMwcrKwhQ7928dl_7qZW0,692
11
- webscout/utils.py,sha256=c_98M4oqpb54pUun3fpGGlCerFD6ZHUbghyp5b7Mwgo,2605
12
- webscout/version.py,sha256=O7Fj-NiGjQvXFncfoqksmWe28FBjunBGo8HwmRXvalw,25
13
- webscout/webscout_search.py,sha256=3_lli-hDb8_kCGwscK29xuUcOS833ROgpNhDzrxh0dk,3085
14
- webscout/webscout_search_async.py,sha256=Y5frH0k3hLqBCR-8dn7a_b7EvxdYxn6wHiKl3jWosE0,40670
15
- webscout-1.2.1.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
16
- webscout-1.2.1.dist-info/METADATA,sha256=FY50l_qZzzwo9fGwK6WFBLAEaDS0Db0AFVfcODFuDOA,24121
17
- webscout-1.2.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
18
- webscout-1.2.1.dist-info/entry_points.txt,sha256=8-93eRslYrzTHs5E-6yFRJrve00C9q-SkXJD113jzRY,197
19
- webscout-1.2.1.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
20
- webscout-1.2.1.dist-info/RECORD,,