webscout 1.0.4__py3-none-any.whl → 1.0.5__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/version.py +1 -1
- {webscout-1.0.4.dist-info → webscout-1.0.5.dist-info}/METADATA +53 -63
- {webscout-1.0.4.dist-info → webscout-1.0.5.dist-info}/RECORD +7 -7
- webscout-1.0.5.dist-info/entry_points.txt +2 -0
- webscout-1.0.4.dist-info/entry_points.txt +0 -2
- {webscout-1.0.4.dist-info → webscout-1.0.5.dist-info}/LICENSE.md +0 -0
- {webscout-1.0.4.dist-info → webscout-1.0.5.dist-info}/WHEEL +0 -0
- {webscout-1.0.4.dist-info → webscout-1.0.5.dist-info}/top_level.txt +0 -0
webscout/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.5"
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary: Search for words, documents, images, news, maps, and text translation using the DuckDuckGo.com
|
|
5
|
-
|
|
6
|
-
Author:
|
|
7
|
-
Author-email: koulabhay25@gmail.com
|
|
3
|
+
Version: 1.0.5
|
|
4
|
+
Summary: Search for words, documents, images, news, maps, and text translation using the DuckDuckGo.com and yep.com periodically.
|
|
5
|
+
Author: OEvortex, Zaid
|
|
6
|
+
Author-email: helpingai5@gmail.com
|
|
8
7
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
9
|
Classifier: Operating System :: OS Independent
|
|
@@ -29,27 +28,33 @@ Provides-Extra: dev
|
|
|
29
28
|
Requires-Dist: ruff >=0.1.6 ; extra == 'dev'
|
|
30
29
|
Requires-Dist: pytest >=7.4.2 ; extra == 'dev'
|
|
31
30
|
|
|
32
|
-
Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com
|
|
33
|
-
|
|
31
|
+
Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com and yep.com
|
|
34
32
|
**⚠️ Warning: use AsyncWEBS in asynchronous code**
|
|
35
33
|
|
|
36
34
|
## Table of Contents
|
|
37
35
|
- [Table of Contents](#table-of-contents)
|
|
36
|
+
- [What is new](#what-is-new)
|
|
37
|
+
- [What is next](#what-is-next)
|
|
38
38
|
- [Install](#install)
|
|
39
39
|
- [CLI version](#cli-version)
|
|
40
|
-
- [Duckduckgo search operators](#duckduckgo-search-operators)
|
|
41
40
|
- [Regions](#regions)
|
|
42
41
|
- [WEBS and AsyncWEBS classes](#webs-and-asyncwebs-classes)
|
|
43
42
|
- [Exceptions](#exceptions)
|
|
44
|
-
- [1. text() - text search by
|
|
45
|
-
- [2. answers() - instant answers by
|
|
46
|
-
- [3. images() - image search by
|
|
47
|
-
- [4. videos() - video search by
|
|
48
|
-
- [5. news() - news search by
|
|
49
|
-
- [6. maps() - map search by
|
|
50
|
-
- [7. translate() - translation by
|
|
51
|
-
- [8. suggestions() - suggestions by
|
|
52
|
-
|
|
43
|
+
- [1. `text()` - text search by DuckDuckGo.com and Yep.com](#1-text---text-search-by-duckduckgocom-and-yepcom)
|
|
44
|
+
- [2. `answers()` - instant answers by DuckDuckGo.com and Yep.com](#2-answers---instant-answers-by-duckduckgocom-and-yepcom)
|
|
45
|
+
- [3. `images()` - image search by DuckDuckGo.com and Yep.com](#3-images---image-search-by-duckduckgocom-and-yepcom)
|
|
46
|
+
- [4. `videos()` - video search by DuckDuckGo.com](#4-videos---video-search-by-duckduckgocom)
|
|
47
|
+
- [5. `news()` - news search by DuckDuckGo.com and yep.com](#5-news---news-search-by-duckduckgocom-and-yepcom)
|
|
48
|
+
- [6. `maps()` - map search by DuckDuckGo.com and](#6-maps---map-search-by-duckduckgocom-and)
|
|
49
|
+
- [7. `translate()` - translation by DuckDuckGo.com and Yep.com](#7-translate---translation-by-duckduckgocom-and-yepcom)
|
|
50
|
+
- [8. `suggestions()` - suggestions by DuckDuckGo.com and Yep.com](#8-suggestions---suggestions-by-duckduckgocom-and-yepcom)
|
|
51
|
+
|
|
52
|
+
## What is new
|
|
53
|
+
- Added yep.com as search engine.
|
|
54
|
+
- solved a error where translate was not working.
|
|
55
|
+
|
|
56
|
+
## What is next
|
|
57
|
+
- trying to add yepchat
|
|
53
58
|
## Install
|
|
54
59
|
```python
|
|
55
60
|
pip install -U webscout
|
|
@@ -61,23 +66,6 @@ pip install -U webscout
|
|
|
61
66
|
python -m webscout --help
|
|
62
67
|
```
|
|
63
68
|
|
|
64
|
-
CLI examples:
|
|
65
|
-
[Go To TOP](#TOP)
|
|
66
|
-
|
|
67
|
-
## Duckduckgo search operators
|
|
68
|
-
|
|
69
|
-
| Keywords example | Result|
|
|
70
|
-
| --- | --- |
|
|
71
|
-
| cats dogs | Results about cats or dogs |
|
|
72
|
-
| "cats and dogs" | Results for exact term "cats and dogs". If no results are found, related results are shown. |
|
|
73
|
-
| cats -dogs | Fewer dogs in results |
|
|
74
|
-
| cats +dogs | More dogs in results |
|
|
75
|
-
| cats filetype:pdf | PDFs about cats. Supported file types: pdf, doc(x), xls(x), ppt(x), html |
|
|
76
|
-
| dogs site:example.com | Pages about dogs from example.com |
|
|
77
|
-
| cats -site:example.com | Pages about cats, excluding example.com |
|
|
78
|
-
| intitle:dogs | Page title includes the word "dogs" |
|
|
79
|
-
| inurl:cats | Page url includes the word "cats" |
|
|
80
|
-
|
|
81
69
|
[Go To TOP](#TOP)
|
|
82
70
|
|
|
83
71
|
## Regions
|
|
@@ -160,27 +148,22 @@ ___
|
|
|
160
148
|
|
|
161
149
|
## WEBS and AsyncWEBS classes
|
|
162
150
|
|
|
163
|
-
The WEBS and AsyncWEBS classes are used to retrieve search results from DuckDuckGo.com.
|
|
151
|
+
The WEBS and AsyncWEBS classes are used to retrieve search results from DuckDuckGo.com and yep.com periodically.
|
|
164
152
|
To use the AsyncWEBS class, you can perform asynchronous operations using Python's asyncio library.
|
|
165
153
|
To initialize an instance of the WEBS or AsyncWEBS classes, you can provide the following optional arguments:
|
|
166
|
-
```python3
|
|
167
|
-
class WEBS:
|
|
168
|
-
"""webscout class to get search results from duckduckgo.com
|
|
169
|
-
|
|
170
|
-
Args:
|
|
171
|
-
headers (dict, optional): Dictionary of headers for the HTTP client. Defaults to None.
|
|
172
|
-
proxies (Union[dict, str], optional): Proxies for the HTTP client (can be dict or str). Defaults to None.
|
|
173
|
-
timeout (int, optional): Timeout value for the HTTP client. Defaults to 10.
|
|
174
|
-
"""
|
|
175
|
-
```
|
|
176
154
|
|
|
177
155
|
Here is an example of initializing the WEBS class:
|
|
178
156
|
```python3
|
|
179
157
|
from webscout import WEBS
|
|
180
158
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
159
|
+
# Instantiating the WEBS class from webscout module
|
|
160
|
+
WEBS_instance = WEBS()
|
|
161
|
+
|
|
162
|
+
# Fetching text results for the query "python programming" with a maximum of 5 results
|
|
163
|
+
results = [result for result in WEBS_instance.text("python programming", max_results=5)]
|
|
164
|
+
|
|
165
|
+
# Displaying the obtained results
|
|
166
|
+
print(results)
|
|
184
167
|
```
|
|
185
168
|
Here is an example of initializing the AsyncWEBS class:
|
|
186
169
|
```python3
|
|
@@ -233,36 +216,39 @@ Exceptions:
|
|
|
233
216
|
- `WebscoutE`: Raised when there is a generic exception during the API request.
|
|
234
217
|
|
|
235
218
|
|
|
236
|
-
|
|
219
|
+
Here are the rewritten Python scripts for accessing various functionalities using the WEBS class from the webscout module, in HelpingAI style, for DuckDuckGo.com and Yep.com without explicitly specifying the search engine:
|
|
220
|
+
|
|
221
|
+
### 1. `text()` - text search by DuckDuckGo.com and Yep.com
|
|
237
222
|
|
|
238
223
|
```python
|
|
239
224
|
from webscout import WEBS
|
|
240
225
|
|
|
226
|
+
# Text search for 'live free or die' using DuckDuckGo.com and Yep.com
|
|
241
227
|
with WEBS() as WEBS:
|
|
242
228
|
for r in WEBS.text('live free or die', region='wt-wt', safesearch='off', timelimit='y', max_results=10):
|
|
243
229
|
print(r)
|
|
244
230
|
|
|
245
|
-
|
|
246
|
-
with WEBS() as WEBS:
|
|
247
|
-
for r in WEBS.text('russia filetype:pdf', region='wt-wt', safesearch='off', timelimit='y', max_results=10):
|
|
231
|
+
for r in WEBS.text('live free or die', region='wt-wt', safesearch='off', timelimit='y', max_results=10):
|
|
248
232
|
print(r)
|
|
249
233
|
```
|
|
250
234
|
|
|
251
|
-
|
|
235
|
+
### 2. `answers()` - instant answers by DuckDuckGo.com and Yep.com
|
|
252
236
|
|
|
253
237
|
```python
|
|
254
238
|
from webscout import WEBS
|
|
255
239
|
|
|
240
|
+
# Instant answers for the query "sun" using DuckDuckGo.com and Yep.com
|
|
256
241
|
with WEBS() as WEBS:
|
|
257
242
|
for r in WEBS.answers("sun"):
|
|
258
243
|
print(r)
|
|
259
244
|
```
|
|
260
245
|
|
|
261
|
-
|
|
246
|
+
### 3. `images()` - image search by DuckDuckGo.com and Yep.com
|
|
262
247
|
|
|
263
248
|
```python
|
|
264
249
|
from webscout import WEBS
|
|
265
250
|
|
|
251
|
+
# Image search for the keyword 'butterfly' using DuckDuckGo.com and Yep.com
|
|
266
252
|
with WEBS() as WEBS:
|
|
267
253
|
keywords = 'butterfly'
|
|
268
254
|
WEBS_images_gen = WEBS.images(
|
|
@@ -280,11 +266,12 @@ with WEBS() as WEBS:
|
|
|
280
266
|
print(r)
|
|
281
267
|
```
|
|
282
268
|
|
|
283
|
-
|
|
269
|
+
### 4. `videos()` - video search by DuckDuckGo.com
|
|
284
270
|
|
|
285
271
|
```python
|
|
286
272
|
from webscout import WEBS
|
|
287
273
|
|
|
274
|
+
# Video search for the keyword 'tesla' using DuckDuckGo.com
|
|
288
275
|
with WEBS() as WEBS:
|
|
289
276
|
keywords = 'tesla'
|
|
290
277
|
WEBS_videos_gen = WEBS.videos(
|
|
@@ -300,11 +287,12 @@ with WEBS() as WEBS:
|
|
|
300
287
|
print(r)
|
|
301
288
|
```
|
|
302
289
|
|
|
303
|
-
|
|
290
|
+
### 5. `news()` - news search by DuckDuckGo.com and yep.com
|
|
304
291
|
|
|
305
292
|
```python
|
|
306
293
|
from webscout import WEBS
|
|
307
294
|
|
|
295
|
+
# News search for the keyword 'holiday' using DuckDuckGo.com and yep.com
|
|
308
296
|
with WEBS() as WEBS:
|
|
309
297
|
keywords = 'holiday'
|
|
310
298
|
WEBS_news_gen = WEBS.news(
|
|
@@ -318,33 +306,35 @@ with WEBS() as WEBS:
|
|
|
318
306
|
print(r)
|
|
319
307
|
```
|
|
320
308
|
|
|
321
|
-
|
|
322
|
-
## 6. maps() - map search by duckduckgo.com
|
|
309
|
+
### 6. `maps()` - map search by DuckDuckGo.com and
|
|
323
310
|
|
|
324
311
|
```python
|
|
325
312
|
from webscout import WEBS
|
|
326
313
|
|
|
314
|
+
# Map search for the keyword 'school' in 'anantnag' using DuckDuckGo.com
|
|
327
315
|
with WEBS() as WEBS:
|
|
328
316
|
for r in WEBS.maps("school", place="anantnag", max_results=50):
|
|
329
317
|
print(r)
|
|
330
318
|
```
|
|
331
319
|
|
|
332
|
-
|
|
333
|
-
## 7. translate() - translation by duckduckgo.com
|
|
320
|
+
### 7. `translate()` - translation by DuckDuckGo.com and Yep.com
|
|
334
321
|
|
|
335
322
|
```python
|
|
336
323
|
from webscout import WEBS
|
|
337
324
|
|
|
325
|
+
# Translation of the keyword 'school' to German ('hi') using DuckDuckGo.com and Yep.com
|
|
338
326
|
with WEBS() as WEBS:
|
|
339
327
|
keywords = 'school'
|
|
340
|
-
r = WEBS.translate(keywords, to="
|
|
328
|
+
r = WEBS.translate(keywords, to="hi")
|
|
341
329
|
print(r)
|
|
342
330
|
```
|
|
343
331
|
|
|
344
|
-
|
|
345
|
-
|
|
332
|
+
### 8. `suggestions()` - suggestions by DuckDuckGo.com and Yep.com
|
|
333
|
+
|
|
334
|
+
```python
|
|
346
335
|
from webscout import WEBS
|
|
347
336
|
|
|
337
|
+
# Suggestions for the keyword 'fly' using DuckDuckGo.com and Yep.com
|
|
348
338
|
with WEBS() as WEBS:
|
|
349
339
|
for r in WEBS.suggestions("fly"):
|
|
350
340
|
print(r)
|
|
@@ -4,12 +4,12 @@ webscout/cli.py,sha256=9opO5KynQ3LA5gPW2czlmy7-ZdfUae6ccrny3vibqzQ,17757
|
|
|
4
4
|
webscout/exceptions.py,sha256=7u52Mt5iyEUCZvaZuEYwQVV8HL8IdZBv1r5s5Ss_xU0,75
|
|
5
5
|
webscout/models.py,sha256=5iQIdtedT18YuTZ3npoG7kLMwcrKwhQ7928dl_7qZW0,692
|
|
6
6
|
webscout/utils.py,sha256=M2ocDpYOVd9lTZA3VGdK_p80Xsr-VPeAoUUCFaMWCqk,1610
|
|
7
|
-
webscout/version.py,sha256=
|
|
7
|
+
webscout/version.py,sha256=lfZikIZ2prlMV6RkxhMRZj5dAeD0TCswIWS46kSjXw0,23
|
|
8
8
|
webscout/webscout_search.py,sha256=_kuNpRhbgge6MubxlsRe9kzBKlHoPEH6-93ILMpycfg,2351
|
|
9
9
|
webscout/webscout_search_async.py,sha256=lNdR18-y8O9HqFsHvlzBYg18qeI12uLEXIzFMP3D_XU,35070
|
|
10
|
-
webscout-1.0.
|
|
11
|
-
webscout-1.0.
|
|
12
|
-
webscout-1.0.
|
|
13
|
-
webscout-1.0.
|
|
14
|
-
webscout-1.0.
|
|
15
|
-
webscout-1.0.
|
|
10
|
+
webscout-1.0.5.dist-info/LICENSE.md,sha256=ple694nFBJxLq83VmOoXLaKHCuN6Zmx4BbcMMLjAWmc,1087
|
|
11
|
+
webscout-1.0.5.dist-info/METADATA,sha256=4xfSlYmNlV5kG6OfoN4zksDFOPM52JzlSvA6027yVow,10383
|
|
12
|
+
webscout-1.0.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
13
|
+
webscout-1.0.5.dist-info/entry_points.txt,sha256=aRJf8ZQpdyIVFPxOHndOORY3pqJ3JfmUp8fQX95Ntf4,42
|
|
14
|
+
webscout-1.0.5.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
|
|
15
|
+
webscout-1.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|