webscout 1.2.0__py3-none-any.whl → 1.2.2__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.0
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.2
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,21 @@ 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
+ - [Usage Example](#usage-example)
77
73
  - [WEBS and AsyncWEBS classes](#webs-and-asyncwebs-classes)
78
74
  - [Exceptions](#exceptions)
79
75
  - [usage of webscout](#usage-of-webscout)
@@ -102,153 +98,6 @@ Also containes AI models that you can use
102
98
  ```python
103
99
  pip install -U webscout
104
100
  ```
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
101
  ## CLI version
253
102
 
254
103
  ```python3
@@ -366,6 +215,59 @@ ___
366
215
  [Go To TOP](#TOP)
367
216
 
368
217
 
218
+
219
+ ## DeepWEBS: Advanced Web Searches
220
+
221
+ `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.
222
+
223
+ ### Activating DeepWEBS
224
+
225
+ 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.
226
+
227
+ ### Usage Example
228
+
229
+ Here's a basic example of how to use the `DeepWEBS` :
230
+ ```python
231
+ from webscout import DeepWEBS
232
+
233
+
234
+ def perform_web_search(query):
235
+ D = DeepWEBS()
236
+ item = D.DeepSearch(
237
+ queries=[query], # Query to search
238
+ result_num=5, # Number of search results
239
+ safe=True, # Enable SafeSearch
240
+ types=["web"], # Search type: web
241
+ extract_webpage=True, # True for extracting webpages
242
+ overwrite_query_html=False,
243
+ overwrite_webpage_html=False,
244
+ )
245
+ results = D.queries_to_search_results(item)
246
+
247
+ return results
248
+
249
+ def print_search_results(results):
250
+ """
251
+ Print the search results.
252
+
253
+ Args:
254
+ - search_results (list): List of search results to print.
255
+ """
256
+ if results:
257
+ for index, result in enumerate(results, start=1):
258
+ print(f"Result {index}: {result}")
259
+ else:
260
+ print("No search results found.")
261
+
262
+ def main():
263
+ query = input("Enter your search query: ")
264
+ results = perform_web_search(query)
265
+ print_search_results(results)
266
+
267
+ if __name__ == "__main__":
268
+ main()
269
+
270
+ ```
369
271
  ## WEBS and AsyncWEBS classes
370
272
 
371
273
  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=ss6qplHctefwb88dePM6fdSiYBM4nob99PFpglfBlAI,2881
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=iO9IBtycTDzoOqy15RzUUcD9rzCbQiB0BJvebpo41s8,1738
8
+ DeepWEBS/networks/network_configs.py,sha256=-Hb78_7SBx32h219FnU14qcHTvBdDUf_QAU6-RTL_e0,726
9
+ DeepWEBS/networks/webpage_fetcher.py,sha256=DpxyuYJpvVlDO09JcSsPzCByjhw-b_ouy_40c5WaEOQ,3823
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=hHoQCOdQJGrPT7A7cXQCfColrUOGITKW5NWd4iJ8dMI,6343
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=Jux9ej4Nrsn-ptJdJyWt9TN1AGVnychpYPsy66KzEHU,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.2.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
29
+ webscout-1.2.2.dist-info/METADATA,sha256=cICkVd_iLzMB31F__L75233nwc-rDLHzeCXrv1XG9w0,21013
30
+ webscout-1.2.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
31
+ webscout-1.2.2.dist-info/entry_points.txt,sha256=8-93eRslYrzTHs5E-6yFRJrve00C9q-SkXJD113jzRY,197
32
+ webscout-1.2.2.dist-info/top_level.txt,sha256=OD5YKy6Y3hldL7SmuxsiEDxAG4LgdSSWwzYk22MF9fk,18
33
+ webscout-1.2.2.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=Ee1cSSPe6RScmqsVKZ4qA-7h6Dii0vXoeCdqGpYMmTQ,25
13
- webscout/webscout_search.py,sha256=RFB8OvDucLCyka1Uex5bXosmVfQYvXf0U4MLLwz6Ar4,3183
14
- webscout/webscout_search_async.py,sha256=Y5frH0k3hLqBCR-8dn7a_b7EvxdYxn6wHiKl3jWosE0,40670
15
- webscout-1.2.0.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
16
- webscout-1.2.0.dist-info/METADATA,sha256=nQlRl769wznwJDzNLUN-xgCjBaQpmcbv1h6uSp6kpkw,24121
17
- webscout-1.2.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
18
- webscout-1.2.0.dist-info/entry_points.txt,sha256=8-93eRslYrzTHs5E-6yFRJrve00C9q-SkXJD113jzRY,197
19
- webscout-1.2.0.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
20
- webscout-1.2.0.dist-info/RECORD,,