webscout 3.2__py3-none-any.whl → 3.4__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/AIutel.py CHANGED
@@ -214,12 +214,12 @@ class Conversation:
214
214
  ), f"File '{filepath}' does not exist"
215
215
  if not os.path.isfile(filepath):
216
216
  logging.debug(f"Creating new chat-history file - '{filepath}'")
217
- with open(filepath, "w") as fh: # Try creating new file
217
+ with open(filepath, "w", encoding='utf-8') as fh: # Try creating new file
218
218
  # lets add intro here
219
219
  fh.write(self.intro)
220
220
  else:
221
221
  logging.debug(f"Loading conversation from '{filepath}'")
222
- with open(filepath) as fh:
222
+ with open(filepath, encoding='utf-8') as fh:
223
223
  file_contents = fh.read()
224
224
  # Presume intro prompt is part of the file content
225
225
  self.chat_history = file_contents
@@ -270,7 +270,7 @@ class Conversation:
270
270
  return
271
271
  new_history = self.history_format % dict(user=prompt, llm=response)
272
272
  if self.file and self.update_file:
273
- with open(self.file, "a") as fh:
273
+ with open(self.file, "a", encoding='utf-8') as fh:
274
274
  fh.write(new_history)
275
275
  self.chat_history += new_history
276
276
 
@@ -1,3 +1,3 @@
1
1
  from llama_cpp import __version__ as __llama_cpp_version__
2
2
 
3
- __version__ = '3.1'
3
+ __version__ = '3.4'
@@ -30,6 +30,7 @@ from .ChatGPTUK import ChatGPTUK
30
30
  from .Poe import POE
31
31
  from .BasedGPT import BasedGPT
32
32
  from .Deepseek import DeepSeek
33
+
33
34
  __all__ = [
34
35
  'ThinkAnyAI',
35
36
  'Xjai',
@@ -61,4 +62,5 @@ __all__ = [
61
62
  'POE',
62
63
  'BasedGPT',
63
64
  'DeepSeek',
65
+
64
66
  ]
webscout/cli.py CHANGED
@@ -7,7 +7,7 @@ from urllib.parse import unquote
7
7
  from pathlib import Path
8
8
  import click
9
9
  from curl_cffi import requests
10
-
10
+ import pyreqwest_impersonate as pri
11
11
  from .webscout_search import WEBS
12
12
  from .utils import json_dumps, json_loads
13
13
  from .version import __version__
@@ -81,10 +81,10 @@ def _sanitize_keywords(keywords):
81
81
 
82
82
  def _download_file(url, dir_path, filename, proxy):
83
83
  try:
84
- resp = requests.get(url, proxies=proxy, impersonate="chrome", timeout=10)
85
- resp.raise_for_status()
86
- with open(os.path.join(dir_path, filename[:200]), "wb") as file:
87
- file.write(resp.content)
84
+ resp = pri.Client(proxy=proxy, impersonate="chrome_124", timeout=10, verify=False).get(url)
85
+ if resp.status_code == 200:
86
+ with open(os.path.join(dir_path, filename[:200]), "wb") as file:
87
+ file.write(resp.content)
88
88
  except Exception as ex:
89
89
  logger.debug(f"download_file url={url} {type(ex).__name__} {ex}")
90
90
 
@@ -93,7 +93,6 @@ def _download_results(keywords, results, images=False, proxy=None, threads=None)
93
93
  path_type = "images" if images else "text"
94
94
  path = f"{path_type}_{keywords}_{datetime.now():%Y%m%d_%H%M%S}"
95
95
  os.makedirs(path, exist_ok=True)
96
- proxy = {"http": proxy, "https": proxy}
97
96
 
98
97
  threads = 10 if threads is None else threads
99
98
  with ThreadPoolExecutor(max_workers=threads) as executor:
@@ -129,13 +128,15 @@ def safe_entry_point():
129
128
  def version():
130
129
  print(__version__)
131
130
  return __version__
131
+
132
+
132
133
  @cli.command()
133
134
  @click.option("-s", "--save", is_flag=True, default=False, help="save the conversation in the json file")
134
135
  @click.option("-p", "--proxy", default=None, help="the proxy to send requests, example: socks5://localhost:9150")
135
136
  def chat(save, proxy):
136
137
  """CLI function to perform an interactive AI chat using DuckDuckGo API."""
137
138
  cache_file = "WEBS_chat_conversation.json"
138
- models = ["gpt-3.5", "claude-3-haiku"]
139
+ models = ["gpt-3.5", "claude-3-haiku", "llama-3-70b", "mixtral-8x7b"]
139
140
  client = WEBS(proxy=proxy)
140
141
 
141
142
  print("DuckDuckGo AI chat. Available models:")
@@ -167,6 +168,7 @@ def chat(save, proxy):
167
168
  if "exit" in user_input.lower() or "quit" in user_input.lower():
168
169
  break
169
170
 
171
+
170
172
  @cli.command()
171
173
  @click.option("-k", "--keywords", required=True, help="text search, keywords for query")
172
174
  @click.option("-r", "--region", default="wt-wt", help="wt-wt, us-en, ru-ru, etc. -region https://duckduckgo.com/params")
@@ -180,7 +182,7 @@ def chat(save, proxy):
180
182
  @click.option("-p", "--proxy", default=None, help="the proxy to send requests, example: socks5://localhost:9150")
181
183
  def text(keywords, region, safesearch, timelimit, backend, output, download, threads, max_results, proxy):
182
184
  """CLI function to perform a text search using DuckDuckGo API."""
183
- data = WEBS(proxies=proxy).text(
185
+ data = WEBS(proxy=proxy).text(
184
186
  keywords=keywords,
185
187
  region=region,
186
188
  safesearch=safesearch,
@@ -206,7 +208,7 @@ def text(keywords, region, safesearch, timelimit, backend, output, download, thr
206
208
  @click.option("-p", "--proxy", default=None, help="the proxy to send requests, example: socks5://localhost:9150")
207
209
  def answers(keywords, output, proxy):
208
210
  """CLI function to perform a answers search using DuckDuckGo API."""
209
- data = WEBS(proxies=proxy).answers(keywords=keywords)
211
+ data = WEBS(proxy=proxy).answers(keywords=keywords)
210
212
  filename = f"answers_{_sanitize_keywords(keywords)}_{datetime.now():%Y%m%d_%H%M%S}"
211
213
  if output == "print":
212
214
  _print_data(data)
@@ -277,7 +279,7 @@ def images(
277
279
  proxy,
278
280
  ):
279
281
  """CLI function to perform a images search using DuckDuckGo API."""
280
- data = WEBS(proxies=proxy).images(
282
+ data = WEBS(proxy=proxy).images(
281
283
  keywords=keywords,
282
284
  region=region,
283
285
  safesearch=safesearch,
@@ -314,7 +316,7 @@ def images(
314
316
  @click.option("-p", "--proxy", default=None, help="the proxy to send requests, example: socks5://localhost:9150")
315
317
  def videos(keywords, region, safesearch, timelimit, resolution, duration, license_videos, max_results, output, proxy):
316
318
  """CLI function to perform a videos search using DuckDuckGo API."""
317
- data = WEBS(proxies=proxy).videos(
319
+ data = WEBS(proxy=proxy).videos(
318
320
  keywords=keywords,
319
321
  region=region,
320
322
  safesearch=safesearch,
@@ -343,7 +345,7 @@ def videos(keywords, region, safesearch, timelimit, resolution, duration, licens
343
345
  @click.option("-p", "--proxy", default=None, help="the proxy to send requests, example: socks5://localhost:9150")
344
346
  def news(keywords, region, safesearch, timelimit, max_results, output, proxy):
345
347
  """CLI function to perform a news search using DuckDuckGo API."""
346
- data = WEBS(proxies=proxy).news(
348
+ data = WEBS(proxy=proxy).news(
347
349
  keywords=keywords, region=region, safesearch=safesearch, timelimit=timelimit, max_results=max_results
348
350
  )
349
351
  filename = f"news_{_sanitize_keywords(keywords)}_{datetime.now():%Y%m%d_%H%M%S}"
@@ -387,7 +389,7 @@ def maps(
387
389
  proxy,
388
390
  ):
389
391
  """CLI function to perform a maps search using DuckDuckGo API."""
390
- data = WEBS(proxies=proxy).maps(
392
+ data = WEBS(proxy=proxy).maps(
391
393
  keywords=keywords,
392
394
  place=place,
393
395
  street=street,
@@ -418,7 +420,7 @@ def maps(
418
420
  @click.option("-p", "--proxy", default=None, help="the proxy to send requests, example: socks5://localhost:9150")
419
421
  def translate(keywords, from_, to, output, proxy):
420
422
  """CLI function to perform translate using DuckDuckGo API."""
421
- data = WEBS(proxies=proxy).translate(keywords=keywords, from_=from_, to=to)
423
+ data = WEBS(proxy=proxy).translate(keywords=keywords, from_=from_, to=to)
422
424
  filename = f"translate_{_sanitize_keywords(keywords)}_{datetime.now():%Y%m%d_%H%M%S}"
423
425
  if output == "print":
424
426
  _print_data(data)
@@ -435,7 +437,7 @@ def translate(keywords, from_, to, output, proxy):
435
437
  @click.option("-p", "--proxy", default=None, help="the proxy to send requests, example: socks5://localhost:9150")
436
438
  def suggestions(keywords, region, output, proxy):
437
439
  """CLI function to perform a suggestions search using DuckDuckGo API."""
438
- data = WEBS(proxies=proxy).suggestions(keywords=keywords, region=region)
440
+ data = WEBS(proxy=proxy).suggestions(keywords=keywords, region=region)
439
441
  filename = f"suggestions_{_sanitize_keywords(keywords)}_{datetime.now():%Y%m%d_%H%M%S}"
440
442
  if output == "print":
441
443
  _print_data(data)
webscout/exceptions.py CHANGED
@@ -1,5 +1,5 @@
1
1
  class WebscoutE(Exception):
2
- """Base exception class for duckduckgo_search."""
2
+ """Base exception class for search."""
3
3
 
4
4
 
5
5
  class RatelimitE(Exception):
webscout/version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "3.1"
1
+ __version__ = "3.4"
2
2
 
@@ -30,11 +30,11 @@ from .utils import (
30
30
  json_loads,
31
31
  )
32
32
 
33
- logger = logging.getLogger("webcout_search.WEBS")
33
+ logger = logging.getLogger("webscout.WEBS")
34
34
 
35
35
 
36
36
  class WEBS:
37
- """webcout_search class to get search results from duckduckgo.com."""
37
+ """webscout class to get search results from duckduckgo.com."""
38
38
 
39
39
  _executor: ThreadPoolExecutor = ThreadPoolExecutor()
40
40
 
@@ -121,16 +121,22 @@ class WEBS:
121
121
  return _extract_vqd(resp_content, keywords)
122
122
 
123
123
  def chat(self, keywords: str, model: str = "gpt-3.5") -> str:
124
- """Initiates a chat session with Webscout AI.
124
+ """Initiates a chat session with DuckDuckGo AI.
125
125
 
126
126
  Args:
127
127
  keywords (str): The initial message or question to send to the AI.
128
- model (str): The model to use: "gpt-3.5", "claude-3-haiku". Defaults to "gpt-3.5".
128
+ model (str): The model to use: "gpt-3.5", "claude-3-haiku", "llama-3-70b", "mixtral-8x7b".
129
+ Defaults to "gpt-3.5".
129
130
 
130
131
  Returns:
131
132
  str: The response from the AI.
132
133
  """
133
- models = {"claude-3-haiku": "claude-3-haiku-20240307", "gpt-3.5": "gpt-3.5-turbo-0125"}
134
+ models = {
135
+ "claude-3-haiku": "claude-3-haiku-20240307",
136
+ "gpt-3.5": "gpt-3.5-turbo-0125",
137
+ "llama-3-70b": "meta-llama/Llama-3-70b-chat-hf",
138
+ "mixtral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1",
139
+ }
134
140
  # vqd
135
141
  if not self._chat_vqd:
136
142
  resp = self.client.get("https://duckduckgo.com/duckchat/v1/status", headers={"x-vqd-accept": "1"})
@@ -167,7 +173,7 @@ class WEBS:
167
173
  backend: str = "api",
168
174
  max_results: Optional[int] = None,
169
175
  ) -> List[Dict[str, str]]:
170
- """Webscout text search. Query params: https://duckduckgo.com/params.
176
+ """DuckDuckGo text search. Query params: https://duckduckgo.com/params.
171
177
 
172
178
  Args:
173
179
  keywords: keywords for query.
@@ -184,7 +190,7 @@ class WEBS:
184
190
  List of dictionaries with search results, or None if there was an error.
185
191
 
186
192
  Raises:
187
- WebscoutE: Base exception for webcout_search errors.
193
+ WebscoutE: Base exception for webscout errors.
188
194
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
189
195
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
190
196
  """
@@ -195,7 +201,7 @@ class WEBS:
195
201
  if backend == "api":
196
202
  results = self._text_api(keywords, region, safesearch, timelimit, max_results)
197
203
  elif backend == "html":
198
- results = self._text_html(keywords, region, safesearch, timelimit, max_results)
204
+ results = self._text_html(keywords, region, timelimit, max_results)
199
205
  elif backend == "lite":
200
206
  results = self._text_lite(keywords, region, timelimit, max_results)
201
207
  return results
@@ -208,7 +214,7 @@ class WEBS:
208
214
  timelimit: Optional[str] = None,
209
215
  max_results: Optional[int] = None,
210
216
  ) -> List[Dict[str, str]]:
211
- """Webscout text search. Query params: https://duckduckgo.com/params.
217
+ """DuckDuckGo text search. Query params: https://duckduckgo.com/params.
212
218
 
213
219
  Args:
214
220
  keywords: keywords for query.
@@ -221,7 +227,7 @@ class WEBS:
221
227
  List of dictionaries with search results.
222
228
 
223
229
  Raises:
224
- WebscoutE: Base exception for webcout_search errors.
230
+ WebscoutE: Base exception for webscout errors.
225
231
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
226
232
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
227
233
  """
@@ -237,6 +243,7 @@ class WEBS:
237
243
  "s": "0",
238
244
  "df": "",
239
245
  "vqd": vqd,
246
+ "bing_market": f"{region[3:]}-{region[:2].upper()}",
240
247
  "ex": "",
241
248
  }
242
249
  safesearch = safesearch.lower()
@@ -273,7 +280,7 @@ class WEBS:
273
280
 
274
281
  slist = [0]
275
282
  if max_results:
276
- max_results = min(max_results, 500)
283
+ max_results = min(max_results, 2023)
277
284
  slist.extend(range(23, max_results, 50))
278
285
  try:
279
286
  for r in self._executor.map(_text_api_page, slist):
@@ -287,16 +294,14 @@ class WEBS:
287
294
  self,
288
295
  keywords: str,
289
296
  region: str = "wt-wt",
290
- safesearch: str = "moderate",
291
297
  timelimit: Optional[str] = None,
292
298
  max_results: Optional[int] = None,
293
299
  ) -> List[Dict[str, str]]:
294
- """Webscout text search. Query params: https://duckduckgo.com/params.
300
+ """DuckDuckGo text search. Query params: https://duckduckgo.com/params.
295
301
 
296
302
  Args:
297
303
  keywords: keywords for query.
298
304
  region: wt-wt, us-en, uk-en, ru-ru, etc. Defaults to "wt-wt".
299
- safesearch: on, moderate, off. Defaults to "moderate".
300
305
  timelimit: d, w, m, y. Defaults to None.
301
306
  max_results: max number of results. If None, returns results only from the first response. Defaults to None.
302
307
 
@@ -304,19 +309,20 @@ class WEBS:
304
309
  List of dictionaries with search results.
305
310
 
306
311
  Raises:
307
- WebscoutE: Base exception for webcout_search errors.
312
+ WebscoutE: Base exception for webscout errors.
308
313
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
309
314
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
310
315
  """
311
316
  assert keywords, "keywords is mandatory"
312
317
 
313
- safesearch_base = {"on": "1", "moderate": "-1", "off": "-2"}
314
318
  payload = {
315
319
  "q": keywords,
316
- "kl": region,
317
- "p": safesearch_base[safesearch.lower()],
320
+ "s": "0",
318
321
  "o": "json",
319
322
  "api": "d.js",
323
+ "vqd": "",
324
+ "kl": region,
325
+ "bing_market": region,
320
326
  }
321
327
  if timelimit:
322
328
  payload["df"] = timelimit
@@ -364,7 +370,7 @@ class WEBS:
364
370
 
365
371
  slist = [0]
366
372
  if max_results:
367
- max_results = min(max_results, 500)
373
+ max_results = min(max_results, 2023)
368
374
  slist.extend(range(23, max_results, 50))
369
375
  try:
370
376
  for r in self._executor.map(_text_html_page, slist):
@@ -381,7 +387,7 @@ class WEBS:
381
387
  timelimit: Optional[str] = None,
382
388
  max_results: Optional[int] = None,
383
389
  ) -> List[Dict[str, str]]:
384
- """Webscout text search. Query params: https://duckduckgo.com/params.
390
+ """DuckDuckGo text search. Query params: https://duckduckgo.com/params.
385
391
 
386
392
  Args:
387
393
  keywords: keywords for query.
@@ -393,7 +399,7 @@ class WEBS:
393
399
  List of dictionaries with search results.
394
400
 
395
401
  Raises:
396
- WebscoutE: Base exception for webcout_search errors.
402
+ WebscoutE: Base exception for webscout errors.
397
403
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
398
404
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
399
405
  """
@@ -401,9 +407,12 @@ class WEBS:
401
407
 
402
408
  payload = {
403
409
  "q": keywords,
410
+ "s": "0",
404
411
  "o": "json",
405
412
  "api": "d.js",
413
+ "vqd": "",
406
414
  "kl": region,
415
+ "bing_market": region,
407
416
  }
408
417
  if timelimit:
409
418
  payload["df"] = timelimit
@@ -455,7 +464,7 @@ class WEBS:
455
464
 
456
465
  slist = [0]
457
466
  if max_results:
458
- max_results = min(max_results, 500)
467
+ max_results = min(max_results, 2023)
459
468
  slist.extend(range(23, max_results, 50))
460
469
  try:
461
470
  for r in self._executor.map(_text_lite_page, slist):
@@ -478,7 +487,7 @@ class WEBS:
478
487
  license_image: Optional[str] = None,
479
488
  max_results: Optional[int] = None,
480
489
  ) -> List[Dict[str, str]]:
481
- """Webscout images search. Query params: https://duckduckgo.com/params.
490
+ """DuckDuckGo images search. Query params: https://duckduckgo.com/params.
482
491
 
483
492
  Args:
484
493
  keywords: keywords for query.
@@ -501,7 +510,7 @@ class WEBS:
501
510
  List of dictionaries with images search results.
502
511
 
503
512
  Raises:
504
- WebscoutE: Base exception for webcout_search errors.
513
+ WebscoutE: Base exception for webscout errors.
505
514
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
506
515
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
507
516
  """
@@ -574,7 +583,7 @@ class WEBS:
574
583
  license_videos: Optional[str] = None,
575
584
  max_results: Optional[int] = None,
576
585
  ) -> List[Dict[str, str]]:
577
- """Webscout videos search. Query params: https://duckduckgo.com/params.
586
+ """DuckDuckGo videos search. Query params: https://duckduckgo.com/params.
578
587
 
579
588
  Args:
580
589
  keywords: keywords for query.
@@ -590,7 +599,7 @@ class WEBS:
590
599
  List of dictionaries with videos search results.
591
600
 
592
601
  Raises:
593
- WebscoutE: Base exception for webcout_search errors.
602
+ WebscoutE: Base exception for webscout errors.
594
603
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
595
604
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
596
605
  """
@@ -631,7 +640,7 @@ class WEBS:
631
640
  slist = [0]
632
641
  if max_results:
633
642
  max_results = min(max_results, 400)
634
- slist.extend(range(59, max_results, 59))
643
+ slist.extend(range(60, max_results, 60))
635
644
  try:
636
645
  for r in self._executor.map(_videos_page, slist):
637
646
  results.extend(r)
@@ -648,7 +657,7 @@ class WEBS:
648
657
  timelimit: Optional[str] = None,
649
658
  max_results: Optional[int] = None,
650
659
  ) -> List[Dict[str, str]]:
651
- """Webscout news search. Query params: https://duckduckgo.com/params.
660
+ """DuckDuckGo news search. Query params: https://duckduckgo.com/params.
652
661
 
653
662
  Args:
654
663
  keywords: keywords for query.
@@ -661,7 +670,7 @@ class WEBS:
661
670
  List of dictionaries with news search results.
662
671
 
663
672
  Raises:
664
- WebscoutE: Base exception for webcout_search errors.
673
+ WebscoutE: Base exception for webscout errors.
665
674
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
666
675
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
667
676
  """
@@ -707,8 +716,8 @@ class WEBS:
707
716
 
708
717
  slist = [0]
709
718
  if max_results:
710
- max_results = min(max_results, 200)
711
- slist.extend(range(29, max_results, 29))
719
+ max_results = min(max_results, 120)
720
+ slist.extend(range(30, max_results, 30))
712
721
  try:
713
722
  for r in self._executor.map(_news_page, slist):
714
723
  results.extend(r)
@@ -718,7 +727,7 @@ class WEBS:
718
727
  return list(islice(results, max_results))
719
728
 
720
729
  def answers(self, keywords: str) -> List[Dict[str, str]]:
721
- """Webscout instant answers. Query params: https://duckduckgo.com/params.
730
+ """DuckDuckGo instant answers. Query params: https://duckduckgo.com/params.
722
731
 
723
732
  Args:
724
733
  keywords: keywords for query,
@@ -727,7 +736,7 @@ class WEBS:
727
736
  List of dictionaries with instant answers results.
728
737
 
729
738
  Raises:
730
- WebscoutE: Base exception for webcout_search errors.
739
+ WebscoutE: Base exception for webscout errors.
731
740
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
732
741
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
733
742
  """
@@ -789,7 +798,7 @@ class WEBS:
789
798
  return results
790
799
 
791
800
  def suggestions(self, keywords: str, region: str = "wt-wt") -> List[Dict[str, str]]:
792
- """Webscout suggestions. Query params: https://duckduckgo.com/params.
801
+ """DuckDuckGo suggestions. Query params: https://duckduckgo.com/params.
793
802
 
794
803
  Args:
795
804
  keywords: keywords for query.
@@ -799,7 +808,7 @@ class WEBS:
799
808
  List of dictionaries with suggestions results.
800
809
 
801
810
  Raises:
802
- WebscoutE: Base exception for webcout_search errors.
811
+ WebscoutE: Base exception for webscout errors.
803
812
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
804
813
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
805
814
  """
@@ -828,7 +837,7 @@ class WEBS:
828
837
  radius: int = 0,
829
838
  max_results: Optional[int] = None,
830
839
  ) -> List[Dict[str, str]]:
831
- """Webscout maps search. Query params: https://duckduckgo.com/params.
840
+ """DuckDuckGo maps search. Query params: https://duckduckgo.com/params.
832
841
 
833
842
  Args:
834
843
  keywords: keywords for query
@@ -849,7 +858,7 @@ class WEBS:
849
858
  List of dictionaries with maps search results, or None if there was an error.
850
859
 
851
860
  Raises:
852
- WebscoutE: Base exception for webcout_search errors.
861
+ WebscoutE: Base exception for webscout errors.
853
862
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
854
863
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
855
864
  """
@@ -1005,7 +1014,7 @@ class WEBS:
1005
1014
  def translate(
1006
1015
  self, keywords: Union[List[str], str], from_: Optional[str] = None, to: str = "en"
1007
1016
  ) -> List[Dict[str, str]]:
1008
- """Webscout translate.
1017
+ """DuckDuckGo translate.
1009
1018
 
1010
1019
  Args:
1011
1020
  keywords: string or list of strings to translate.
@@ -1016,7 +1025,7 @@ class WEBS:
1016
1025
  List od dictionaries with translated keywords.
1017
1026
 
1018
1027
  Raises:
1019
- WebscoutE: Base exception for webcout_search errors.
1028
+ WebscoutE: Base exception for webscout errors.
1020
1029
  RatelimitE: Inherits from WebscoutE, raised for exceeding API request rate limits.
1021
1030
  TimeoutE: Inherits from WebscoutE, raised for API request timeouts.
1022
1031
  """
@@ -37,11 +37,12 @@ class AsyncWEBS(WEBS):
37
37
  pass
38
38
 
39
39
  async def achat(self, keywords: str, model: str = "gpt-3.5") -> str:
40
- """Initiates async chat session with Webscout AI.
40
+ """Initiates async chat session with DuckDuckGo AI.
41
41
 
42
42
  Args:
43
43
  keywords (str): The initial message or question to send to the AI.
44
- model (str): The model to use: "gpt-3.5", "claude-3-haiku". Defaults to "gpt-3.5".
44
+ model (str): The model to use: "gpt-3.5", "claude-3-haiku", "llama-3-70b", "mixtral-8x7b".
45
+ Defaults to "gpt-3.5".
45
46
 
46
47
  Returns:
47
48
  str: The response from the AI.
@@ -58,7 +59,7 @@ class AsyncWEBS(WEBS):
58
59
  backend: str = "api",
59
60
  max_results: Optional[int] = None,
60
61
  ) -> List[Dict[str, str]]:
61
- """Webscout async text search. Query params: https://duckduckgo.com/params.
62
+ """DuckDuckGo async text search. Query params: https://duckduckgo.com/params.
62
63
 
63
64
  Args:
64
65
  keywords: keywords for query.
@@ -97,7 +98,7 @@ class AsyncWEBS(WEBS):
97
98
  license_image: Optional[str] = None,
98
99
  max_results: Optional[int] = None,
99
100
  ) -> List[Dict[str, str]]:
100
- """Webscout async images search. Query params: https://duckduckgo.com/params.
101
+ """DuckDuckGo async images search. Query params: https://duckduckgo.com/params.
101
102
 
102
103
  Args:
103
104
  keywords: keywords for query.
@@ -151,7 +152,7 @@ class AsyncWEBS(WEBS):
151
152
  license_videos: Optional[str] = None,
152
153
  max_results: Optional[int] = None,
153
154
  ) -> List[Dict[str, str]]:
154
- """Webscout async videos search. Query params: https://duckduckgo.com/params.
155
+ """DuckDuckGo async videos search. Query params: https://duckduckgo.com/params.
155
156
 
156
157
  Args:
157
158
  keywords: keywords for query.
@@ -193,7 +194,7 @@ class AsyncWEBS(WEBS):
193
194
  timelimit: Optional[str] = None,
194
195
  max_results: Optional[int] = None,
195
196
  ) -> List[Dict[str, str]]:
196
- """Webscout async news search. Query params: https://duckduckgo.com/params.
197
+ """DuckDuckGo async news search. Query params: https://duckduckgo.com/params.
197
198
 
198
199
  Args:
199
200
  keywords: keywords for query.
@@ -225,7 +226,7 @@ class AsyncWEBS(WEBS):
225
226
  self,
226
227
  keywords: str,
227
228
  ) -> List[Dict[str, str]]:
228
- """Webscout async instant answers. Query params: https://duckduckgo.com/params.
229
+ """DuckDuckGo async instant answers. Query params: https://duckduckgo.com/params.
229
230
 
230
231
  Args:
231
232
  keywords: keywords for query,
@@ -250,7 +251,7 @@ class AsyncWEBS(WEBS):
250
251
  keywords: str,
251
252
  region: str = "wt-wt",
252
253
  ) -> List[Dict[str, str]]:
253
- """Webscout async suggestions. Query params: https://duckduckgo.com/params.
254
+ """DuckDuckGo async suggestions. Query params: https://duckduckgo.com/params.
254
255
 
255
256
  Args:
256
257
  keywords: keywords for query.
@@ -287,7 +288,7 @@ class AsyncWEBS(WEBS):
287
288
  radius: int = 0,
288
289
  max_results: Optional[int] = None,
289
290
  ) -> List[Dict[str, str]]:
290
- """Webscout async maps search. Query params: https://duckduckgo.com/params.
291
+ """DuckDuckGo async maps search. Query params: https://duckduckgo.com/params.
291
292
 
292
293
  Args:
293
294
  keywords: keywords for query
@@ -336,7 +337,7 @@ class AsyncWEBS(WEBS):
336
337
  from_: Optional[str] = None,
337
338
  to: str = "en",
338
339
  ) -> List[Dict[str, str]]:
339
- """Webscout async translate.
340
+ """DuckDuckGo async translate.
340
341
 
341
342
  Args:
342
343
  keywords: string or list of strings to translate.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: webscout
3
- Version: 3.2
3
+ Version: 3.4
4
4
  Summary: Search for anything using Google, DuckDuckGo, phind.com, Contains AI models, can transcribe yt videos, temporary email and phone number generation, has TTS support, webai (terminal gpt and open interpreter) and offline LLMs
5
5
  Author: OEvortex
6
6
  Author-email: helpingai5@gmail.com
@@ -943,7 +943,7 @@ ___
943
943
  ### 0. `Duckchat` - chat with LLM
944
944
  ```python
945
945
  from webscout import WEBS as w
946
- R = w().chat("hello", model='claude-3-haiku') # GPT-3.5 Turbo
946
+ R = w().chat("hello", model='claude-3-haiku') # GPT-3.5 Turbo, mixtral-8x7b, llama-3-70b, claude-3-haiku
947
947
  print(R)
948
948
  ```
949
949
  ### 1. `PhindSearch` - Search using Phind.com
@@ -12,26 +12,26 @@ DeepWEBS/utilsdw/enver.py,sha256=vpI7s4_o_VL9govSryOv-z1zYK3pTEW3-H9QNN8JYtc,247
12
12
  DeepWEBS/utilsdw/logger.py,sha256=Z0nFUcEGyU8r28yKiIyvEtO26xxpmJgbvNToTfwZecc,8174
13
13
  webscout/AIauto.py,sha256=xPGr_Z0h27XXNh4Wiufjn9TksDOqxqlaGcLUYKNP55w,18246
14
14
  webscout/AIbase.py,sha256=GoHbN8r0gq2saYRZv6LA-Fr9Jlcjv80STKFXUq2ZeGU,4710
15
- webscout/AIutel.py,sha256=9ILWTcru3yw5Cs-OTGQqI-P0L-bYjc_PsdDBTbJNHRc,33400
15
+ webscout/AIutel.py,sha256=Ghe9w1gqnCZTwjc3NzXymSamY3nP0zEep4NiATW32Qk,33454
16
16
  webscout/DWEBS.py,sha256=QT-7-dUgWhQ_H7EVZD53AVyXxyskoPMKCkFIpzkN56Q,7332
17
17
  webscout/LLM.py,sha256=LbGCZdJf8A5dwfoGS4tyy39tAh5BDdhMZP0ScKaaQfU,4184
18
18
  webscout/__init__.py,sha256=pOqM5UGmljQN4jTrL3kyrjMv66VuTPyzfNlXZra9KLQ,1872
19
19
  webscout/__main__.py,sha256=ZtTRgsRjUi2JOvYFLF1ZCh55Sdoz94I-BS-TlJC7WDU,126
20
20
  webscout/async_providers.py,sha256=holBv5SxanxVXc_92CBBaXHlB2IakB_fHnhyZaFjYF8,684
21
- webscout/cli.py,sha256=174iWc0NxwfYMq9vyIk_NNnd3Q8bkzEiCa_BE6a0WZY,18743
22
- webscout/exceptions.py,sha256=Wx8bEN3bz1nNZ9PAZHX8jwvFPddF9Y2pHAEwCMu_VJc,498
21
+ webscout/cli.py,sha256=enw_dPTCG3sNC1TXt96XccnpRmF4Etr99nh-RbGYags,18784
22
+ webscout/exceptions.py,sha256=YtIs-vXBwcjbt9TZ_wB7yI0dO7ANYIZAmEEeLmoQ2fI,487
23
23
  webscout/g4f.py,sha256=NNcnlOtIWV9R93UsBN4jBGBEJ9sJ-Np1WbgjkGVDcYc,24487
24
24
  webscout/models.py,sha256=5iQIdtedT18YuTZ3npoG7kLMwcrKwhQ7928dl_7qZW0,692
25
25
  webscout/tempid.py,sha256=5oc3UbXhPGKxrMRTfRABT-V-dNzH_hOKWtLYM6iCWd4,5896
26
26
  webscout/transcriber.py,sha256=EddvTSq7dPJ42V3pQVnGuEiYQ7WjJ9uyeR9kMSxN7uY,20622
27
27
  webscout/utils.py,sha256=CxeXvp0rWIulUrEaPZMaNfg_tSuQLRSV8uuHA2chyKE,2603
28
- webscout/version.py,sha256=ZXcHuaEBaIH89v_gIvqcKVULdIIv9r489XLDrqSqDUo,23
28
+ webscout/version.py,sha256=pTj22SSXb7rieyMXdGyEFmljJmZMa6FL_DaETjfeLwA,23
29
29
  webscout/voice.py,sha256=0QjXTHAQmCK07IDZXRc7JXem47cnPJH7u3X0sVP1-UQ,967
30
30
  webscout/webai.py,sha256=hnRfUI9AT3MgltP68bAmW5Tq4_aWcYytYeTFEsgS7u0,85991
31
- webscout/webscout_search.py,sha256=8tDmlskNtIUAM41dqIc387ufC1YunovTm6w5NqeM_yQ,42650
32
- webscout/webscout_search_async.py,sha256=ecn9b0J6YtAxMER80iUF1cgn_eh3Ysj7jFpievJzDbE,14471
31
+ webscout/webscout_search.py,sha256=lFAot1-Qil_YfXieeLakDVDEX8Ckcima4ueXdOYwiMc,42804
32
+ webscout/webscout_search_async.py,sha256=dooKGwLm0cwTml55Vy6NHPPY-nymEqX2h8laX94Zg5A,14537
33
33
  webscout/Local/__init__.py,sha256=RN6klpbabPGNX2YzPm_hdeUcQvieUwvJt22uAO2RKSM,238
34
- webscout/Local/_version.py,sha256=_K1dEsde19FCHSmC1pCe9Ut_PzboJoV9w3ZMY835kqQ,83
34
+ webscout/Local/_version.py,sha256=hC_EHWR519ZOsyRw9i6gXEfU5IAIR_B9d3THLVmkWXw,83
35
35
  webscout/Local/formats.py,sha256=BiZZSoN3e8S6-S-ykBL9ogSUs0vK11GaZ3ghc9U8GRk,18994
36
36
  webscout/Local/model.py,sha256=T_bzNNrxEyOyLyhp6fKwiuVBBkXC2a37LzJVCxFIxOU,30710
37
37
  webscout/Local/rawdog.py,sha256=LtA7bck2HyvWmovuaG86Iiquiz7XiMcxBlebo9IuGBY,35744
@@ -59,10 +59,10 @@ webscout/Provider/ThinkAnyAI.py,sha256=_qFjj0djxxrranyEY33w14oizyRjzlVwMv_hzvVtw
59
59
  webscout/Provider/Xjai.py,sha256=BIlk2ouz9Kh_0Gg9hPvTqhI7XtcmWdg5vHSX_4uGrIs,9039
60
60
  webscout/Provider/Yepchat.py,sha256=2Eit-A7w1ph1GQKNQuur_yaDzI64r0yBGxCIjDefJxQ,19875
61
61
  webscout/Provider/Youchat.py,sha256=UVGBuGSjv4uRibn1xflmCjYcfrRTKnDvX3adhag6T98,7976
62
- webscout/Provider/__init__.py,sha256=lxvdW9dUk7rSjZTUaI4PrfTMGEwktJ_c82iyg-n9LIk,1506
63
- webscout-3.2.dist-info/LICENSE.md,sha256=9P0imsudI7MEvZe2pOcg8rKBn6E5FGHQ-riYozZI-Bk,2942
64
- webscout-3.2.dist-info/METADATA,sha256=4WLQIoVuuVrvjygK1SJnOhNTdlAPEkdRpjrnqMmLZlM,67184
65
- webscout-3.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
66
- webscout-3.2.dist-info/entry_points.txt,sha256=Hh4YIIjvkqB9SVxZ2ri4DZUkgEu_WF_5_r_nZDIvfG8,73
67
- webscout-3.2.dist-info/top_level.txt,sha256=OD5YKy6Y3hldL7SmuxsiEDxAG4LgdSSWwzYk22MF9fk,18
68
- webscout-3.2.dist-info/RECORD,,
62
+ webscout/Provider/__init__.py,sha256=nmZYPpXyp8s0xn4UO9IMhkV7-RfGqMdOa3CRmG0uuTg,1510
63
+ webscout-3.4.dist-info/LICENSE.md,sha256=9P0imsudI7MEvZe2pOcg8rKBn6E5FGHQ-riYozZI-Bk,2942
64
+ webscout-3.4.dist-info/METADATA,sha256=t8Hfgd5KshA4OOid1ovzYd83p890DBmZWGFWFn1pTFE,67227
65
+ webscout-3.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
66
+ webscout-3.4.dist-info/entry_points.txt,sha256=Hh4YIIjvkqB9SVxZ2ri4DZUkgEu_WF_5_r_nZDIvfG8,73
67
+ webscout-3.4.dist-info/top_level.txt,sha256=OD5YKy6Y3hldL7SmuxsiEDxAG4LgdSSWwzYk22MF9fk,18
68
+ webscout-3.4.dist-info/RECORD,,
File without changes