webscout 5.2__tar.gz → 5.4__tar.gz

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 (111) hide show
  1. webscout-5.2/README.md → webscout-5.4/PKG-INFO +110 -118
  2. webscout-5.2/PKG-INFO → webscout-5.4/README.md +46 -197
  3. {webscout-5.2 → webscout-5.4}/setup.py +2 -17
  4. {webscout-5.2 → webscout-5.4}/webscout/AIauto.py +8 -12
  5. {webscout-5.2 → webscout-5.4}/webscout/AIutel.py +10 -10
  6. {webscout-5.2 → webscout-5.4}/webscout/Agents/Onlinesearcher.py +5 -5
  7. webscout-5.4/webscout/Agents/functioncall.py +198 -0
  8. webscout-5.4/webscout/DWEBS.py +179 -0
  9. webscout-5.4/webscout/Local/_version.py +3 -0
  10. {webscout-5.2 → webscout-5.4}/webscout/Provider/Andi.py +1 -21
  11. {webscout-5.2 → webscout-5.4}/webscout/Provider/BasedGPT.py +1 -21
  12. {webscout-5.2 → webscout-5.4}/webscout/Provider/Blackboxai.py +1 -21
  13. webscout-5.4/webscout/Provider/Chatify.py +175 -0
  14. {webscout-5.2 → webscout-5.4}/webscout/Provider/Cloudflare.py +1 -22
  15. {webscout-5.2 → webscout-5.4}/webscout/Provider/Cohere.py +2 -23
  16. {webscout-5.2 → webscout-5.4}/webscout/Provider/DARKAI.py +0 -1
  17. {webscout-5.2 → webscout-5.4}/webscout/Provider/Deepinfra.py +2 -16
  18. {webscout-5.2 → webscout-5.4}/webscout/Provider/EDITEE.py +3 -26
  19. {webscout-5.2 → webscout-5.4}/webscout/Provider/Gemini.py +1 -24
  20. {webscout-5.2 → webscout-5.4}/webscout/Provider/Groq.py +0 -2
  21. {webscout-5.2 → webscout-5.4}/webscout/Provider/Koboldai.py +0 -21
  22. {webscout-5.2 → webscout-5.4}/webscout/Provider/Llama.py +4 -21
  23. {webscout-5.2 → webscout-5.4}/webscout/Provider/NetFly.py +21 -61
  24. {webscout-5.2 → webscout-5.4}/webscout/Provider/OLLAMA.py +0 -17
  25. {webscout-5.2 → webscout-5.4}/webscout/Provider/Openai.py +2 -22
  26. {webscout-5.2 → webscout-5.4}/webscout/Provider/Perplexity.py +1 -2
  27. webscout-5.4/webscout/Provider/Phind.py +503 -0
  28. {webscout-5.2 → webscout-5.4}/webscout/Provider/RUBIKSAI.py +11 -5
  29. {webscout-5.2 → webscout-5.4}/webscout/Provider/Reka.py +4 -21
  30. {webscout-5.2 → webscout-5.4}/webscout/Provider/TTS/streamElements.py +1 -22
  31. {webscout-5.2 → webscout-5.4}/webscout/Provider/TTS/voicepod.py +11 -8
  32. {webscout-5.2 → webscout-5.4}/webscout/Provider/ThinkAnyAI.py +17 -78
  33. {webscout-5.2 → webscout-5.4}/webscout/Provider/Youchat.py +3 -20
  34. {webscout-5.2 → webscout-5.4}/webscout/Provider/__init__.py +17 -8
  35. {webscout-5.2 → webscout-5.4}/webscout/Provider/ai4chat.py +14 -8
  36. webscout-5.4/webscout/Provider/cerebras.py +199 -0
  37. webscout-5.4/webscout/Provider/cleeai.py +212 -0
  38. webscout-5.2/webscout/Provider/felo_search.py → webscout-5.4/webscout/Provider/elmo.py +68 -69
  39. webscout-5.4/webscout/Provider/felo_search.py +180 -0
  40. webscout-5.4/webscout/Provider/geminiapi.py +198 -0
  41. webscout-5.4/webscout/Provider/genspark.py +222 -0
  42. {webscout-5.2 → webscout-5.4}/webscout/Provider/julius.py +3 -20
  43. {webscout-5.2 → webscout-5.4}/webscout/Provider/koala.py +1 -1
  44. webscout-5.4/webscout/Provider/lepton.py +194 -0
  45. {webscout-5.2 → webscout-5.4}/webscout/Provider/turboseek.py +4 -21
  46. webscout-5.4/webscout/Provider/x0gpt.py +182 -0
  47. {webscout-5.2 → webscout-5.4}/webscout/Provider/xdash.py +2 -22
  48. webscout-5.4/webscout/Provider/yep.py +500 -0
  49. {webscout-5.2 → webscout-5.4}/webscout/YTdownloader.py +2 -3
  50. {webscout-5.2 → webscout-5.4}/webscout/__init__.py +2 -2
  51. {webscout-5.2 → webscout-5.4}/webscout/exceptions.py +2 -1
  52. {webscout-5.2 → webscout-5.4}/webscout/transcriber.py +195 -140
  53. {webscout-5.2 → webscout-5.4}/webscout/version.py +1 -1
  54. {webscout-5.2 → webscout-5.4}/webscout.egg-info/PKG-INFO +47 -134
  55. {webscout-5.2 → webscout-5.4}/webscout.egg-info/SOURCES.txt +8 -3
  56. {webscout-5.2 → webscout-5.4}/webscout.egg-info/requires.txt +0 -15
  57. webscout-5.2/webscout/Agents/functioncall.py +0 -172
  58. webscout-5.2/webscout/DWEBS.py +0 -157
  59. webscout-5.2/webscout/Local/_version.py +0 -3
  60. webscout-5.2/webscout/Provider/Berlin4h.py +0 -217
  61. webscout-5.2/webscout/Provider/Phind.py +0 -1008
  62. webscout-5.2/webscout/Provider/liaobots.py +0 -268
  63. webscout-5.2/webscout/Provider/yep.py +0 -258
  64. webscout-5.2/webscout/voice.py +0 -34
  65. {webscout-5.2 → webscout-5.4}/LICENSE.md +0 -0
  66. {webscout-5.2 → webscout-5.4}/setup.cfg +0 -0
  67. {webscout-5.2 → webscout-5.4}/webscout/AIbase.py +0 -0
  68. {webscout-5.2 → webscout-5.4}/webscout/Agents/__init__.py +0 -0
  69. {webscout-5.2 → webscout-5.4}/webscout/Agents/ai.py +0 -0
  70. {webscout-5.2 → webscout-5.4}/webscout/Bard.py +0 -0
  71. {webscout-5.2 → webscout-5.4}/webscout/Bing_search.py +0 -0
  72. {webscout-5.2 → webscout-5.4}/webscout/Extra/__init__.py +0 -0
  73. {webscout-5.2 → webscout-5.4}/webscout/Extra/autollama.py +0 -0
  74. {webscout-5.2 → webscout-5.4}/webscout/Extra/gguf.py +0 -0
  75. {webscout-5.2 → webscout-5.4}/webscout/Extra/weather.py +0 -0
  76. {webscout-5.2 → webscout-5.4}/webscout/Extra/weather_ascii.py +0 -0
  77. {webscout-5.2 → webscout-5.4}/webscout/LLM.py +0 -0
  78. {webscout-5.2 → webscout-5.4}/webscout/Local/__init__.py +0 -0
  79. {webscout-5.2 → webscout-5.4}/webscout/Local/formats.py +0 -0
  80. {webscout-5.2 → webscout-5.4}/webscout/Local/model.py +0 -0
  81. {webscout-5.2 → webscout-5.4}/webscout/Local/rawdog.py +0 -0
  82. {webscout-5.2 → webscout-5.4}/webscout/Local/samplers.py +0 -0
  83. {webscout-5.2 → webscout-5.4}/webscout/Local/thread.py +0 -0
  84. {webscout-5.2 → webscout-5.4}/webscout/Local/utils.py +0 -0
  85. {webscout-5.2 → webscout-5.4}/webscout/Provider/AI21.py +0 -0
  86. {webscout-5.2 → webscout-5.4}/webscout/Provider/Deepseek.py +0 -0
  87. {webscout-5.2 → webscout-5.4}/webscout/Provider/DiscordRocks.py +0 -0
  88. {webscout-5.2 → webscout-5.4}/webscout/Provider/Farfalle.py +0 -0
  89. {webscout-5.2 → webscout-5.4}/webscout/Provider/Llama3.py +0 -0
  90. {webscout-5.2 → webscout-5.4}/webscout/Provider/PI.py +0 -0
  91. {webscout-5.2 → webscout-5.4}/webscout/Provider/PizzaGPT.py +0 -0
  92. {webscout-5.2 → webscout-5.4}/webscout/Provider/Poe.py +0 -0
  93. {webscout-5.2 → webscout-5.4}/webscout/Provider/TTI/PollinationsAI.py +0 -0
  94. {webscout-5.2 → webscout-5.4}/webscout/Provider/TTI/__init__.py +0 -0
  95. {webscout-5.2 → webscout-5.4}/webscout/Provider/TTI/deepinfra.py +0 -0
  96. {webscout-5.2 → webscout-5.4}/webscout/Provider/TTS/__init__.py +0 -0
  97. {webscout-5.2 → webscout-5.4}/webscout/Provider/TeachAnything.py +0 -0
  98. {webscout-5.2 → webscout-5.4}/webscout/Provider/meta.py +0 -0
  99. {webscout-5.2 → webscout-5.4}/webscout/__main__.py +0 -0
  100. {webscout-5.2 → webscout-5.4}/webscout/cli.py +0 -0
  101. {webscout-5.2 → webscout-5.4}/webscout/g4f.py +0 -0
  102. {webscout-5.2 → webscout-5.4}/webscout/models.py +0 -0
  103. {webscout-5.2 → webscout-5.4}/webscout/tempid.py +0 -0
  104. {webscout-5.2 → webscout-5.4}/webscout/utils.py +0 -0
  105. {webscout-5.2 → webscout-5.4}/webscout/webai.py +0 -0
  106. {webscout-5.2 → webscout-5.4}/webscout/webscout_search.py +0 -0
  107. {webscout-5.2 → webscout-5.4}/webscout/webscout_search_async.py +0 -0
  108. {webscout-5.2 → webscout-5.4}/webscout/websx_search.py +0 -0
  109. {webscout-5.2 → webscout-5.4}/webscout.egg-info/dependency_links.txt +0 -0
  110. {webscout-5.2 → webscout-5.4}/webscout.egg-info/entry_points.txt +0 -0
  111. {webscout-5.2 → webscout-5.4}/webscout.egg-info/top_level.txt +0 -0
@@ -1,3 +1,67 @@
1
+ Metadata-Version: 2.1
2
+ Name: webscout
3
+ Version: 5.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 and more
5
+ Author: OEvortex
6
+ Author-email: helpingai5@gmail.com
7
+ License: HelpingAI
8
+ Project-URL: Documentation, https://github.com/OE-LUCIFER/Webscout/wiki
9
+ Project-URL: Source, https://github.com/OE-LUCIFER/Webscout
10
+ Project-URL: Tracker, https://github.com/OE-LUCIFER/Webscout/issues
11
+ Project-URL: YouTube, https://youtube.com/@OEvortex
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: Other/Proprietary License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: Implementation :: CPython
23
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE.md
27
+ Requires-Dist: docstring_inheritance
28
+ Requires-Dist: click
29
+ Requires-Dist: curl_cffi
30
+ Requires-Dist: lxml
31
+ Requires-Dist: nest-asyncio
32
+ Requires-Dist: g4f>=0.2.2.3
33
+ Requires-Dist: g4f[webdriver]
34
+ Requires-Dist: rich
35
+ Requires-Dist: beautifulsoup4
36
+ Requires-Dist: markdownify
37
+ Requires-Dist: pydantic
38
+ Requires-Dist: requests
39
+ Requires-Dist: termcolor
40
+ Requires-Dist: orjson
41
+ Requires-Dist: PyYAML
42
+ Requires-Dist: appdirs
43
+ Requires-Dist: tls_client
44
+ Requires-Dist: clipman
45
+ Requires-Dist: playsound
46
+ Requires-Dist: poe_api_wrapper
47
+ Requires-Dist: pyreqwest_impersonate
48
+ Requires-Dist: ollama
49
+ Requires-Dist: pyfiglet
50
+ Requires-Dist: pillow
51
+ Requires-Dist: requests_html
52
+ Requires-Dist: bson
53
+ Requires-Dist: cloudscraper
54
+ Requires-Dist: emoji
55
+ Requires-Dist: openai
56
+ Provides-Extra: dev
57
+ Requires-Dist: ruff>=0.1.6; extra == "dev"
58
+ Requires-Dist: pytest>=7.4.2; extra == "dev"
59
+ Provides-Extra: local
60
+ Requires-Dist: llama-cpp-python; extra == "local"
61
+ Requires-Dist: colorama; extra == "local"
62
+ Requires-Dist: numpy; extra == "local"
63
+ Requires-Dist: huggingface_hub[cli]; extra == "local"
64
+
1
65
  <div align="center">
2
66
  <!-- Replace `#` with your actual links -->
3
67
  <a href="https://t.me/devsdocode"><img alt="Telegram" src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"></a>
@@ -260,57 +324,12 @@ if __name__ == '__main__':
260
324
  ## Transcriber
261
325
  The transcriber function in webscout is a handy tool that transcribes YouTube videos. Here's an example code demonstrating its usage:
262
326
  ```python
263
- import sys
264
- from webscout import transcriber
265
-
266
- def extract_transcript(video_id):
267
- """Extracts the transcript from a YouTube video."""
268
- try:
269
- transcript_list = transcriber.list_transcripts(video_id)
270
- for transcript in transcript_list:
271
- transcript_data_list = transcript.fetch()
272
- lang = transcript.language
273
- transcript_text = ""
274
- if transcript.language_code == 'en':
275
- for line in transcript_data_list:
276
- start_time = line['start']
277
- end_time = start_time + line['duration']
278
- formatted_line = f"{start_time:.2f} - {end_time:.2f}: {line['text']}\n"
279
- transcript_text += formatted_line
280
- return transcript_text
281
- elif transcript.is_translatable:
282
- english_transcript_list = transcript.translate('en').fetch()
283
- for line in english_transcript_list:
284
- start_time = line['start']
285
- end_time = start_time + line['duration']
286
- formatted_line = f"{start_time:.2f} - {end_time:.2f}: {line['text']}\n"
287
- transcript_text += formatted_line
288
- return transcript_text
289
- print("Transcript extraction failed. Please check the video URL.")
290
- except Exception as e:
291
- print(f"Error: {e}")
292
-
293
- def main():
294
- video_url = input("Enter the video link: ")
295
-
296
- if video_url:
297
- video_id = video_url.split("=")[1]
298
- print("Video URL:", video_url)
299
- submit = input("Press 'Enter' to get the transcript or type 'exit' to quit: ")
300
- if submit == '':
301
- print("Extracting Transcript...")
302
- transcript = extract_transcript(video_id)
303
- print('Transcript:')
304
- print(transcript)
305
- print("__________________________________________________________________________________")
306
- elif submit.lower() == 'exit':
307
- print("Exiting...")
308
- sys.exit()
309
- else:
310
- print("Invalid input. Please try again.")
311
-
312
- if __name__ == "__main__":
313
- main()
327
+ from webscout import YTTranscriber
328
+ yt = YTTranscriber()
329
+ from rich import print
330
+ video_url = input("Enter the YouTube video URL: ")
331
+ transcript = yt.get_transcript(video_url, languages=None)
332
+ print(transcript)
314
333
  ```
315
334
 
316
335
  ## GoogleS -- formerly DWEBS
@@ -318,7 +337,7 @@ if __name__ == "__main__":
318
337
  from webscout import GoogleS
319
338
  from rich import print
320
339
  searcher = GoogleS()
321
- results = searcher.search("HelpingAI-9B", max_results=20, extract_webpage_text=False, max_extract_characters=100)
340
+ results = searcher.search("HelpingAI-9B", max_results=20, extract_text=False, max_text_length=200)
322
341
  for result in results:
323
342
  print(result)
324
343
  ```
@@ -332,36 +351,20 @@ for result in results:
332
351
  print(result)
333
352
  ```
334
353
 
335
- ## Text-to-Speech:
336
- ```python
337
- from webscout import play_audio
338
-
339
- message = "This is an example of text-to-speech."
340
- audio_content = play_audio(message, voice="Brian")
341
-
342
- # Save the audio to a file
343
- with open("output.mp3", "wb") as f:
344
- f.write(audio_content)
345
- ```
346
- ### Available TTS Voices:
347
- You can choose from a wide range of voices, including:
348
- - Filiz, Astrid, Tatyana, Maxim, Carmen, Ines, Cristiano, Vitoria, Ricardo, Maja, Jan, Jacek, Ewa, Ruben, Lotte, Liv, Seoyeon, Takumi, Mizuki, Giorgio, Carla, Bianca, Karl, Dora, Mathieu, Celine, Chantal, Penelope, Miguel, Mia, Enrique, Conchita, Geraint, Salli, Matthew, Kimberly, Kendra, Justin, Joey, Joanna, Ivy, Raveena, Aditi, Emma, Brian, Amy, Russell, Nicole, Vicki, Marlene, Hans, Naja, Mads, Gwyneth, Zhiyu
349
- - Standard and WaveNet voices for various languages (e.g., en-US, es-ES, ja-JP, etc.)
350
-
351
354
 
352
355
  The WEBS and AsyncWEBS classes are used to retrieve search results from DuckDuckGo.com
353
356
  To use the AsyncWEBS class, you can perform asynchronous operations using Python's asyncio library.
354
357
  To initialize an instance of the WEBS or AsyncWEBS classes, you can provide the following optional arguments:
355
358
 
356
359
  Here is an example of initializing the WEBS class:
357
- ```python3
360
+ ```python
358
361
  from webscout import WEBS
359
362
 
360
363
  R = WEBS().text("python programming", max_results=5)
361
364
  print(R)
362
365
  ```
363
366
  Here is an example of initializing the AsyncWEBS class:
364
- ```python3
367
+ ```python
365
368
  import asyncio
366
369
  import logging
367
370
  import sys
@@ -834,7 +837,7 @@ resp = bot.generate("AI-generated image - webscout", 1)
834
837
  print(bot.save(resp))
835
838
  ```
836
839
 
837
- ### Text to Speach - Voicepods, StreamElements
840
+ ### Text to speech - Voicepods, StreamElements
838
841
  ```python
839
842
  from webscout import Voicepods
840
843
  voicepods = Voicepods()
@@ -853,7 +856,7 @@ from webscout import WEBS as w
853
856
  R = w().chat("Who are you", model='gpt-4o-mini') # GPT-3.5 Turbo, mixtral-8x7b, llama-3-70b, claude-3-haiku, gpt-4o-mini
854
857
  print(R)
855
858
  ```
856
- ### `PhindSearch` - Search using Phind.com
859
+ ### `PhindSearch` - Search using Phind.com
857
860
 
858
861
  ```python
859
862
  from webscout import PhindSearch
@@ -889,34 +892,6 @@ message = ph.get_message(response)
889
892
  print(message)
890
893
  ```
891
894
 
892
-
893
- ### `You.com` - search/chat with you.com - Not working
894
- ```python
895
-
896
- from webscout import YouChat
897
- from rich import print
898
-
899
- ai = YouChat(
900
- is_conversation=True,
901
- max_tokens=800,
902
- timeout=30,
903
- intro=None,
904
- filepath=None,
905
- update_file=True,
906
- proxies={},
907
- history_offset=10250,
908
- act=None,
909
- )
910
-
911
- prompt = "what is meaning of life"
912
-
913
- response = ai.ask(prompt)
914
-
915
- # Extract and print the message from the response
916
- message = ai.get_message(response)
917
- print(message)
918
- ```
919
-
920
895
  ### `Gemini` - search with google gemini
921
896
 
922
897
  ```python
@@ -935,26 +910,43 @@ gemini = GEMINI(cookie_file=COOKIE_FILE, proxy=PROXIES)
935
910
  response = gemini.chat("websearch about HelpingAI and who is its developer")
936
911
  print(response)
937
912
  ```
938
- ### `Berlin4h` - chat with Berlin4h
913
+ ### `YEPCHAT`
939
914
  ```python
940
- from webscout import Berlin4h
915
+ from webscout import YEPCHAT
916
+ ai = YEPCHAT(Tools=False)
917
+ response = ai.chat(input(">>> "))
918
+ for chunk in response:
919
+ print(chunk, end="", flush=True)
920
+ #---------------Tool Call-------------
941
921
 
942
- ai = Berlin4h(
943
- is_conversation=True,
944
- max_tokens=800,
945
- timeout=30,
946
- intro=None,
947
- filepath=None,
948
- update_file=True,
949
- proxies={},
950
- history_offset=10250,
951
- act=None,
922
+ from rich import print
923
+ from webscout import YEPCHAT
924
+ def get_current_time():
925
+ import datetime
926
+ return f"The current time is {datetime.datetime.now().strftime('%H:%M:%S')}"
927
+ def get_weather(location: str) -> str:
928
+ return f"The weather in {location} is sunny."
929
+
930
+
931
+ ai = YEPCHAT(Tools=True) # Set Tools=True to use tools in the chat.
932
+
933
+ ai.tool_registry.register_tool("get_current_time", get_current_time, "Gets the current time.")
934
+ ai.tool_registry.register_tool(
935
+ "get_weather",
936
+ get_weather,
937
+ "Gets the weather for a given location.",
938
+ parameters={
939
+ "type": "object",
940
+ "properties": {
941
+ "location": {"type": "string", "description": "The city and state, or zip code"}
942
+ },
943
+ "required": ["location"],
944
+ },
952
945
  )
953
946
 
954
- # Example usage:
955
- prompt = "Explain the concept of recursion in simple terms."
956
- response = ai.chat(prompt)
957
- print(response)
947
+ response = ai.chat(input(">>> "))
948
+ for chunk in response:
949
+ print(chunk, end="", flush=True)
958
950
  ```
959
951
  ### `BlackBox` - Search/chat With BlackBox
960
952
  ```python
@@ -1104,7 +1096,7 @@ print(message)
1104
1096
  Usage code similar to other proviers
1105
1097
 
1106
1098
  ### `BasedGPT` - chat with GPT
1107
- ```
1099
+ ```py
1108
1100
  from webscout import BasedGPT
1109
1101
 
1110
1102
  # Initialize the BasedGPT provider
@@ -1413,7 +1405,7 @@ if "error" not in function_call_data:
1413
1405
  else:
1414
1406
  print(f"Error: {function_call_data['error']}")
1415
1407
  ```
1416
- ### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, XDASH, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, NetFly, Editee
1408
+ ### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, XDASH, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, NetFly, Editee, AI21, Chatify, Cerebras, X0GPT, Lepton, GEMINIAPI, Cleeai, Elmo, Genspark
1417
1409
  code similar to other provider
1418
1410
  ### `LLM`
1419
1411
  ```python
@@ -1,82 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: webscout
3
- Version: 5.2
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 and more
5
- Author: OEvortex
6
- Author-email: helpingai5@gmail.com
7
- License: HelpingAI
8
- Project-URL: Documentation, https://github.com/OE-LUCIFER/Webscout/wiki
9
- Project-URL: Source, https://github.com/OE-LUCIFER/Webscout
10
- Project-URL: Tracker, https://github.com/OE-LUCIFER/Webscout/issues
11
- Project-URL: YouTube, https://youtube.com/@OEvortex
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: Other/Proprietary License
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Programming Language :: Python :: Implementation :: CPython
23
- Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
24
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
- Description-Content-Type: text/markdown
26
- License-File: LICENSE.md
27
- Requires-Dist: docstring_inheritance
28
- Requires-Dist: click
29
- Requires-Dist: curl_cffi
30
- Requires-Dist: lxml
31
- Requires-Dist: nest-asyncio
32
- Requires-Dist: selenium
33
- Requires-Dist: tqdm
34
- Requires-Dist: webdriver-manager
35
- Requires-Dist: halo>=0.0.31
36
- Requires-Dist: g4f>=0.2.2.3
37
- Requires-Dist: g4f[webdriver]
38
- Requires-Dist: rich
39
- Requires-Dist: python-dotenv
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
48
- Requires-Dist: orjson
49
- Requires-Dist: PyYAML
50
- Requires-Dist: appdirs
51
- Requires-Dist: GoogleBard1>=2.1.4
52
- Requires-Dist: tls_client
53
- Requires-Dist: clipman
54
- Requires-Dist: Helpingai-T2
55
- Requires-Dist: playsound
56
- Requires-Dist: poe_api_wrapper
57
- Requires-Dist: pyreqwest_impersonate
58
- Requires-Dist: ballyregan
59
- Requires-Dist: nodriver
60
- Requires-Dist: PyExecJS
61
- Requires-Dist: ollama
62
- Requires-Dist: pyfiglet
63
- Requires-Dist: yaspin
64
- Requires-Dist: pillow
65
- Requires-Dist: requests_html
66
- Requires-Dist: bson
67
- Requires-Dist: cloudscraper
68
- Requires-Dist: emoji
69
- Requires-Dist: colorlog
70
- Requires-Dist: openai
71
- Provides-Extra: dev
72
- Requires-Dist: ruff>=0.1.6; extra == "dev"
73
- Requires-Dist: pytest>=7.4.2; extra == "dev"
74
- Provides-Extra: local
75
- Requires-Dist: llama-cpp-python; extra == "local"
76
- Requires-Dist: colorama; extra == "local"
77
- Requires-Dist: numpy; extra == "local"
78
- Requires-Dist: huggingface_hub[cli]; extra == "local"
79
-
80
1
  <div align="center">
81
2
  <!-- Replace `#` with your actual links -->
82
3
  <a href="https://t.me/devsdocode"><img alt="Telegram" src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"></a>
@@ -339,57 +260,12 @@ if __name__ == '__main__':
339
260
  ## Transcriber
340
261
  The transcriber function in webscout is a handy tool that transcribes YouTube videos. Here's an example code demonstrating its usage:
341
262
  ```python
342
- import sys
343
- from webscout import transcriber
344
-
345
- def extract_transcript(video_id):
346
- """Extracts the transcript from a YouTube video."""
347
- try:
348
- transcript_list = transcriber.list_transcripts(video_id)
349
- for transcript in transcript_list:
350
- transcript_data_list = transcript.fetch()
351
- lang = transcript.language
352
- transcript_text = ""
353
- if transcript.language_code == 'en':
354
- for line in transcript_data_list:
355
- start_time = line['start']
356
- end_time = start_time + line['duration']
357
- formatted_line = f"{start_time:.2f} - {end_time:.2f}: {line['text']}\n"
358
- transcript_text += formatted_line
359
- return transcript_text
360
- elif transcript.is_translatable:
361
- english_transcript_list = transcript.translate('en').fetch()
362
- for line in english_transcript_list:
363
- start_time = line['start']
364
- end_time = start_time + line['duration']
365
- formatted_line = f"{start_time:.2f} - {end_time:.2f}: {line['text']}\n"
366
- transcript_text += formatted_line
367
- return transcript_text
368
- print("Transcript extraction failed. Please check the video URL.")
369
- except Exception as e:
370
- print(f"Error: {e}")
371
-
372
- def main():
373
- video_url = input("Enter the video link: ")
374
-
375
- if video_url:
376
- video_id = video_url.split("=")[1]
377
- print("Video URL:", video_url)
378
- submit = input("Press 'Enter' to get the transcript or type 'exit' to quit: ")
379
- if submit == '':
380
- print("Extracting Transcript...")
381
- transcript = extract_transcript(video_id)
382
- print('Transcript:')
383
- print(transcript)
384
- print("__________________________________________________________________________________")
385
- elif submit.lower() == 'exit':
386
- print("Exiting...")
387
- sys.exit()
388
- else:
389
- print("Invalid input. Please try again.")
390
-
391
- if __name__ == "__main__":
392
- main()
263
+ from webscout import YTTranscriber
264
+ yt = YTTranscriber()
265
+ from rich import print
266
+ video_url = input("Enter the YouTube video URL: ")
267
+ transcript = yt.get_transcript(video_url, languages=None)
268
+ print(transcript)
393
269
  ```
394
270
 
395
271
  ## GoogleS -- formerly DWEBS
@@ -397,7 +273,7 @@ if __name__ == "__main__":
397
273
  from webscout import GoogleS
398
274
  from rich import print
399
275
  searcher = GoogleS()
400
- results = searcher.search("HelpingAI-9B", max_results=20, extract_webpage_text=False, max_extract_characters=100)
276
+ results = searcher.search("HelpingAI-9B", max_results=20, extract_text=False, max_text_length=200)
401
277
  for result in results:
402
278
  print(result)
403
279
  ```
@@ -411,36 +287,20 @@ for result in results:
411
287
  print(result)
412
288
  ```
413
289
 
414
- ## Text-to-Speech:
415
- ```python
416
- from webscout import play_audio
417
-
418
- message = "This is an example of text-to-speech."
419
- audio_content = play_audio(message, voice="Brian")
420
-
421
- # Save the audio to a file
422
- with open("output.mp3", "wb") as f:
423
- f.write(audio_content)
424
- ```
425
- ### Available TTS Voices:
426
- You can choose from a wide range of voices, including:
427
- - Filiz, Astrid, Tatyana, Maxim, Carmen, Ines, Cristiano, Vitoria, Ricardo, Maja, Jan, Jacek, Ewa, Ruben, Lotte, Liv, Seoyeon, Takumi, Mizuki, Giorgio, Carla, Bianca, Karl, Dora, Mathieu, Celine, Chantal, Penelope, Miguel, Mia, Enrique, Conchita, Geraint, Salli, Matthew, Kimberly, Kendra, Justin, Joey, Joanna, Ivy, Raveena, Aditi, Emma, Brian, Amy, Russell, Nicole, Vicki, Marlene, Hans, Naja, Mads, Gwyneth, Zhiyu
428
- - Standard and WaveNet voices for various languages (e.g., en-US, es-ES, ja-JP, etc.)
429
-
430
290
 
431
291
  The WEBS and AsyncWEBS classes are used to retrieve search results from DuckDuckGo.com
432
292
  To use the AsyncWEBS class, you can perform asynchronous operations using Python's asyncio library.
433
293
  To initialize an instance of the WEBS or AsyncWEBS classes, you can provide the following optional arguments:
434
294
 
435
295
  Here is an example of initializing the WEBS class:
436
- ```python3
296
+ ```python
437
297
  from webscout import WEBS
438
298
 
439
299
  R = WEBS().text("python programming", max_results=5)
440
300
  print(R)
441
301
  ```
442
302
  Here is an example of initializing the AsyncWEBS class:
443
- ```python3
303
+ ```python
444
304
  import asyncio
445
305
  import logging
446
306
  import sys
@@ -913,7 +773,7 @@ resp = bot.generate("AI-generated image - webscout", 1)
913
773
  print(bot.save(resp))
914
774
  ```
915
775
 
916
- ### Text to Speach - Voicepods, StreamElements
776
+ ### Text to speech - Voicepods, StreamElements
917
777
  ```python
918
778
  from webscout import Voicepods
919
779
  voicepods = Voicepods()
@@ -932,7 +792,7 @@ from webscout import WEBS as w
932
792
  R = w().chat("Who are you", model='gpt-4o-mini') # GPT-3.5 Turbo, mixtral-8x7b, llama-3-70b, claude-3-haiku, gpt-4o-mini
933
793
  print(R)
934
794
  ```
935
- ### `PhindSearch` - Search using Phind.com
795
+ ### `PhindSearch` - Search using Phind.com
936
796
 
937
797
  ```python
938
798
  from webscout import PhindSearch
@@ -968,34 +828,6 @@ message = ph.get_message(response)
968
828
  print(message)
969
829
  ```
970
830
 
971
-
972
- ### `You.com` - search/chat with you.com - Not working
973
- ```python
974
-
975
- from webscout import YouChat
976
- from rich import print
977
-
978
- ai = YouChat(
979
- is_conversation=True,
980
- max_tokens=800,
981
- timeout=30,
982
- intro=None,
983
- filepath=None,
984
- update_file=True,
985
- proxies={},
986
- history_offset=10250,
987
- act=None,
988
- )
989
-
990
- prompt = "what is meaning of life"
991
-
992
- response = ai.ask(prompt)
993
-
994
- # Extract and print the message from the response
995
- message = ai.get_message(response)
996
- print(message)
997
- ```
998
-
999
831
  ### `Gemini` - search with google gemini
1000
832
 
1001
833
  ```python
@@ -1014,26 +846,43 @@ gemini = GEMINI(cookie_file=COOKIE_FILE, proxy=PROXIES)
1014
846
  response = gemini.chat("websearch about HelpingAI and who is its developer")
1015
847
  print(response)
1016
848
  ```
1017
- ### `Berlin4h` - chat with Berlin4h
849
+ ### `YEPCHAT`
1018
850
  ```python
1019
- from webscout import Berlin4h
851
+ from webscout import YEPCHAT
852
+ ai = YEPCHAT(Tools=False)
853
+ response = ai.chat(input(">>> "))
854
+ for chunk in response:
855
+ print(chunk, end="", flush=True)
856
+ #---------------Tool Call-------------
1020
857
 
1021
- ai = Berlin4h(
1022
- is_conversation=True,
1023
- max_tokens=800,
1024
- timeout=30,
1025
- intro=None,
1026
- filepath=None,
1027
- update_file=True,
1028
- proxies={},
1029
- history_offset=10250,
1030
- act=None,
858
+ from rich import print
859
+ from webscout import YEPCHAT
860
+ def get_current_time():
861
+ import datetime
862
+ return f"The current time is {datetime.datetime.now().strftime('%H:%M:%S')}"
863
+ def get_weather(location: str) -> str:
864
+ return f"The weather in {location} is sunny."
865
+
866
+
867
+ ai = YEPCHAT(Tools=True) # Set Tools=True to use tools in the chat.
868
+
869
+ ai.tool_registry.register_tool("get_current_time", get_current_time, "Gets the current time.")
870
+ ai.tool_registry.register_tool(
871
+ "get_weather",
872
+ get_weather,
873
+ "Gets the weather for a given location.",
874
+ parameters={
875
+ "type": "object",
876
+ "properties": {
877
+ "location": {"type": "string", "description": "The city and state, or zip code"}
878
+ },
879
+ "required": ["location"],
880
+ },
1031
881
  )
1032
882
 
1033
- # Example usage:
1034
- prompt = "Explain the concept of recursion in simple terms."
1035
- response = ai.chat(prompt)
1036
- print(response)
883
+ response = ai.chat(input(">>> "))
884
+ for chunk in response:
885
+ print(chunk, end="", flush=True)
1037
886
  ```
1038
887
  ### `BlackBox` - Search/chat With BlackBox
1039
888
  ```python
@@ -1183,7 +1032,7 @@ print(message)
1183
1032
  Usage code similar to other proviers
1184
1033
 
1185
1034
  ### `BasedGPT` - chat with GPT
1186
- ```
1035
+ ```py
1187
1036
  from webscout import BasedGPT
1188
1037
 
1189
1038
  # Initialize the BasedGPT provider
@@ -1492,7 +1341,7 @@ if "error" not in function_call_data:
1492
1341
  else:
1493
1342
  print(f"Error: {function_call_data['error']}")
1494
1343
  ```
1495
- ### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, XDASH, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, NetFly, Editee
1344
+ ### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, XDASH, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, NetFly, Editee, AI21, Chatify, Cerebras, X0GPT, Lepton, GEMINIAPI, Cleeai, Elmo, Genspark
1496
1345
  code similar to other provider
1497
1346
  ### `LLM`
1498
1347
  ```python
@@ -1,11 +1,11 @@
1
1
  from setuptools import setup, find_packages
2
-
2
+ from webscout.version import __prog__, __version__
3
3
  with open("README.md", encoding="utf-8") as f:
4
4
  README = f.read()
5
5
 
6
6
  setup(
7
7
  name="webscout",
8
- version="5.2",
8
+ version=__version__,
9
9
  description="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 and more",
10
10
  long_description=README,
11
11
  long_description_content_type="text/markdown",
@@ -33,44 +33,29 @@ setup(
33
33
  "curl_cffi",
34
34
  "lxml",
35
35
  "nest-asyncio",
36
- "selenium",
37
- "tqdm",
38
- "webdriver-manager",
39
- "halo>=0.0.31",
40
36
  "g4f>=0.2.2.3",
41
37
  "g4f[webdriver]",
42
38
  "rich",
43
- "python-dotenv",
44
39
  "beautifulsoup4",
45
40
  "markdownify",
46
41
  "pydantic",
47
42
  "requests",
48
- "sse_starlette",
49
43
  "termcolor",
50
- "tiktoken",
51
- "tldextract",
52
44
  "orjson",
53
45
  "PyYAML",
54
46
  "appdirs",
55
- "GoogleBard1>=2.1.4",
56
47
  "tls_client",
57
48
  "clipman",
58
- "Helpingai-T2",
59
49
  "playsound",
60
50
  "poe_api_wrapper",
61
51
  "pyreqwest_impersonate",
62
- "ballyregan",
63
- "nodriver",
64
- "PyExecJS",
65
52
  "ollama",
66
53
  "pyfiglet",
67
- "yaspin",
68
54
  "pillow",
69
55
  "requests_html",
70
56
  "bson",
71
57
  "cloudscraper",
72
58
  "emoji",
73
- "colorlog",
74
59
  "openai",
75
60
  ],
76
61
  entry_points={