webscout 1.3.6__py3-none-any.whl → 1.3.8__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: webscout
3
- Version: 1.3.6
3
+ Version: 1.3.8
4
4
  Summary: Search for anything using the Google, DuckDuckGo.com, yep.com, phind.com, you.com, etc Also containes AI models, can transcribe yt videos, have TTS support and now has webai(terminal gpt and open interpeter) support
5
5
  Author: OEvortex
6
6
  Author-email: helpingai5@gmail.com
@@ -46,6 +46,7 @@ Requires-Dist: termcolor
46
46
  Requires-Dist: tiktoken
47
47
  Requires-Dist: tldextract
48
48
  Requires-Dist: orjson
49
+ Requires-Dist: PyYAML
49
50
  Provides-Extra: dev
50
51
  Requires-Dist: ruff >=0.1.6 ; extra == 'dev'
51
52
  Requires-Dist: pytest >=7.4.2 ; extra == 'dev'
@@ -10,28 +10,27 @@ DeepWEBS/networks/webpage_fetcher.py,sha256=vRB9T3o-nMgrMkG2NPHTDctNeXaPSKCmBXqu
10
10
  DeepWEBS/utilsdw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  DeepWEBS/utilsdw/enver.py,sha256=vpI7s4_o_VL9govSryOv-z1zYK3pTEW3-H9QNN8JYtc,2472
12
12
  DeepWEBS/utilsdw/logger.py,sha256=Z0nFUcEGyU8r28yKiIyvEtO26xxpmJgbvNToTfwZecc,8174
13
- webscout/AI.py,sha256=rl5-O-stc1FCvKVsvjC1qlbDCTIGW9mYi05fsOWwnYA,119027
13
+ webscout/AI.py,sha256=p5OmcPVZxG6WQ4Y4EDPmCYfHg6jXfhTVtIIyMMXAvjY,110135
14
14
  webscout/AIbase.py,sha256=vQi2ougu5bG-QdmoYmxCQsOg7KTEgG7EF6nZh5qqUGw,2343
15
- webscout/AIutel.py,sha256=QwOEdsoboyOop2GW7lu8l_ZnrFb9TN8FrWWPsaFNzKU,24453
15
+ webscout/AIutel.py,sha256=csBD8bqP2tCeNHbfwvj_SLCHSTSSmWkWOiM0uie0qdg,32585
16
16
  webscout/DWEBS.py,sha256=QT-7-dUgWhQ_H7EVZD53AVyXxyskoPMKCkFIpzkN56Q,7332
17
- webscout/HelpingAI.py,sha256=YeZw0zYVHMcBFFPNdd3_Ghpm9ebt_EScQjHO_IIs4lg,8103
18
17
  webscout/LLM.py,sha256=CiDz0okZNEoXuxMwadZnwRGSLpqk2zg0vzvXSxQZjcE,1910
19
18
  webscout/__init__.py,sha256=yA465j5M4a6u3wtQHGEM57FH5Cb86cAV3Lp0MRcaZkw,1042
20
19
  webscout/__main__.py,sha256=ZtTRgsRjUi2JOvYFLF1ZCh55Sdoz94I-BS-TlJC7WDU,126
21
20
  webscout/cli.py,sha256=F888fdrFUQgczMBN4yMOSf6Nh-IbvkqpPhDsbnA2FtQ,17059
22
21
  webscout/exceptions.py,sha256=4AOO5wexeL96nvUS-badcckcwrPS7UpZyAgB9vknHZE,276
23
- webscout/g4f.py,sha256=NEZbXOoVfmHiKcSjVpBMNKZzHgbTJLsd8xOXjtn4js4,16358
22
+ webscout/g4f.py,sha256=9oAd6ke9LB1pAGouxFQc-vxs3iOsgq0eqw2EyhP_CoA,16831
24
23
  webscout/models.py,sha256=5iQIdtedT18YuTZ3npoG7kLMwcrKwhQ7928dl_7qZW0,692
25
24
  webscout/transcriber.py,sha256=EddvTSq7dPJ42V3pQVnGuEiYQ7WjJ9uyeR9kMSxN7uY,20622
26
25
  webscout/utils.py,sha256=c_98M4oqpb54pUun3fpGGlCerFD6ZHUbghyp5b7Mwgo,2605
27
- webscout/version.py,sha256=lXdfqHqoX9RttSEm10OiusQmVO7SMygzE2W164D7704,25
28
- webscout/voice.py,sha256=1Ids_2ToPBMX0cH_UyPMkY_6eSE9H4Gazrl0ujPmFag,941
29
- webscout/webai.py,sha256=oQgJVkNHc_BeIQbQG5rGCx1AadMzfQggNGha3IRthRc,76302
26
+ webscout/version.py,sha256=Q-Na6BGgN5t7iVeh9-qLCQJVgTdGveKcrtsBmXkyNPc,25
27
+ webscout/voice.py,sha256=0QjXTHAQmCK07IDZXRc7JXem47cnPJH7u3X0sVP1-UQ,967
28
+ webscout/webai.py,sha256=Lx2CMm0-wgANH3pFURtIqBHyIZJBOOv-VT-jEn_6nR8,80881
30
29
  webscout/webscout_search.py,sha256=3_lli-hDb8_kCGwscK29xuUcOS833ROgpNhDzrxh0dk,3085
31
30
  webscout/webscout_search_async.py,sha256=Y5frH0k3hLqBCR-8dn7a_b7EvxdYxn6wHiKl3jWosE0,40670
32
- webscout-1.3.6.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
33
- webscout-1.3.6.dist-info/METADATA,sha256=4WtkJ4GTnb8UrgYyZDINJ9J9dDp-bTjUQtvyjw7yoJM,32467
34
- webscout-1.3.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
35
- webscout-1.3.6.dist-info/entry_points.txt,sha256=8-93eRslYrzTHs5E-6yFRJrve00C9q-SkXJD113jzRY,197
36
- webscout-1.3.6.dist-info/top_level.txt,sha256=OD5YKy6Y3hldL7SmuxsiEDxAG4LgdSSWwzYk22MF9fk,18
37
- webscout-1.3.6.dist-info/RECORD,,
31
+ webscout-1.3.8.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
32
+ webscout-1.3.8.dist-info/METADATA,sha256=z2ZuQTaq7K0z50nsX6sR8wh5KxHtX4WLnv1YIobLWeU,32490
33
+ webscout-1.3.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
34
+ webscout-1.3.8.dist-info/entry_points.txt,sha256=8-93eRslYrzTHs5E-6yFRJrve00C9q-SkXJD113jzRY,197
35
+ webscout-1.3.8.dist-info/top_level.txt,sha256=OD5YKy6Y3hldL7SmuxsiEDxAG4LgdSSWwzYk22MF9fk,18
36
+ webscout-1.3.8.dist-info/RECORD,,
webscout/HelpingAI.py DELETED
@@ -1,192 +0,0 @@
1
- import warnings
2
- from selenium import webdriver
3
- from selenium.webdriver.chrome.options import Options
4
- from selenium.webdriver.common.by import By
5
- from selenium.common.exceptions import NoSuchElementException
6
- import time
7
- import os
8
- import requests
9
- from rich import print
10
- from dotenv import load_dotenv
11
- import random
12
- import string
13
- import json
14
- from typing import NoReturn, List, Dict, Union
15
- import requests
16
- from uuid import uuid4
17
- from re import findall
18
- from curl_cffi.requests import get, RequestsError
19
- import time
20
- from selenium import webdriver
21
- from selenium.webdriver.chrome.options import Options
22
- from selenium.webdriver.common.by import By
23
- from selenium.webdriver.support import expected_conditions as EC
24
- from selenium.webdriver.support.ui import WebDriverWait
25
- from halo import Halo
26
-
27
- class ChatBot:
28
- def __init__(self):
29
- load_dotenv()
30
- options = Options()
31
- options.add_argument('--no-sandbox')
32
- options.add_argument('--headless')
33
- options.add_argument('--disable-dev-shm-usage')
34
- options.add_argument("start-maximized")
35
- options.add_argument("disable-infobars")
36
- options.add_argument("--disable-extensions")
37
- options.add_argument("--disable-gpu")
38
- options.add_argument("--disable-dev-shm-usage")
39
- options.add_argument('--log-level=3') # Add this line
40
- warnings.simplefilter("ignore")
41
- # Initialize WebDriver
42
- self.driver = webdriver.Chrome(options=options)
43
-
44
- self.HelpingAI = "https://vortex.zapier.app/"
45
- # Navigate to the target URL
46
- self.driver.get(self.HelpingAI)
47
- time.sleep(7)
48
-
49
- # Security Bypass: Refresh the page if the title contains 'just a moment'
50
- while 'just a moment' in self.driver.title.lower():
51
- self.driver.refresh()
52
-
53
- # Initialize Chat_Num
54
- self.Chat_Num = 2
55
-
56
- # Function to increment Chat_Num
57
- def increment_chat_num(self):
58
- self.Chat_Num = str(int(self.Chat_Num) + 1)
59
-
60
- # Function to send a query and retrieve response
61
- def send_query(self, query):
62
- text_box_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/textarea"
63
- send_button_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/button"
64
- response_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[2]"
65
- button_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[1]/div/form/div/div[1]/button"
66
-
67
- # Find the text box, enter query, and click send
68
- text_box = self.driver.find_element(by=By.XPATH, value=text_box_xpath)
69
- text_box.clear()
70
- text_box.send_keys(query)
71
- time.sleep(0.25) # Pause for 1 second after typing query
72
-
73
- send_button = self.driver.find_element(by=By.XPATH, value=send_button_xpath)
74
- send_button.click()
75
-
76
- # Continuously check for the presence of the button every second
77
- while True:
78
- try:
79
- button = self.driver.find_element(by=By.XPATH, value=button_xpath)
80
- # If the button is found, retrieve and print the response
81
- response = self.driver.find_element(by=By.XPATH, value=response_xpath).text
82
- print("🤖:", response)
83
- break
84
- except NoSuchElementException:
85
- time.sleep(0.25) # If the button is not found, wait for 1 second before checking again
86
-
87
- self.increment_chat_num()
88
-
89
- # Function to ask the user for a query, send it, and print the response
90
- def query_chat(self):
91
- while True:
92
- query = input("🧑: ")
93
- if query.lower() == 'exit':
94
- break
95
-
96
- self.send_query(query)
97
- time.sleep(0.25) # Pause for 1 second before asking for the next query
98
-
99
- # Close the browser window
100
- def close(self):
101
- self.driver.quit()
102
-
103
- class WEBS:
104
- def __init__(self):
105
- load_dotenv()
106
- options = Options()
107
- options.add_argument('--no-sandbox')
108
- options.add_argument('--headless')
109
- options.add_argument('--disable-dev-shm-usage')
110
- options.add_argument("start-maximized")
111
- options.add_argument("disable-infobars")
112
- options.add_argument("--disable-extensions")
113
- options.add_argument("--disable-gpu")
114
- options.add_argument("--disable-dev-shm-usage")
115
- options.add_argument('--log-level=3')
116
- warnings.simplefilter("ignore")
117
- # Initialize WebDriver without specifying the path to the driver
118
- self.driver = webdriver.Chrome(options=options)
119
-
120
- self.HelpingAI = "https://vortex.zapier.app/"
121
- # Navigate to the target URL
122
- self.driver.get(self.HelpingAI)
123
- time.sleep(7)
124
-
125
- # Security Bypass: Refresh the page if the title contains 'just a moment'
126
- while 'just a moment' in self.driver.title.lower():
127
- self.driver.refresh()
128
-
129
- # Initialize Chat_Num
130
- self.Chat_Num = 2
131
-
132
- # Function to increment Chat_Num
133
- def increment_chat_num(self):
134
- self.Chat_Num = str(int(self.Chat_Num) + 1)
135
-
136
- # Function to send a query and retrieve response
137
- def send_query(self, prompt):
138
- text_box_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/textarea"
139
- send_button_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/button"
140
- response_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[2]"
141
- button_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[1]/div/form/div/div[1]/button"
142
-
143
- # Find the text box, enter prompt, and click send
144
- text_box = self.driver.find_element(by=By.XPATH, value=text_box_xpath)
145
- text_box.clear()
146
- text_box.send_keys(prompt)
147
- time.sleep(1) # Pause for 1 second after typing prompt
148
-
149
- send_button = self.driver.find_element(by=By.XPATH, value=send_button_xpath)
150
- send_button.click()
151
-
152
- # Continuously check for the presence of the button every second
153
- while True:
154
- try:
155
- button = self.driver.find_element(by=By.XPATH, value=button_xpath)
156
- # If the button is found, retrieve and print the response
157
- response = self.driver.find_element(by=By.XPATH, value=response_xpath).text
158
- print("🤖:", response)
159
- break
160
- except NoSuchElementException:
161
- time.sleep(0.25) # If the button is not found, wait for 1 second before checking again
162
-
163
- self.increment_chat_num()
164
-
165
- # Function to perform web search
166
- def web_search(self, query):
167
- url = "https://abhaykoul-webscout1.hf.space/mws"
168
- payload = {"query": query}
169
- response = requests.post(url, json=payload)
170
-
171
- if response.status_code == 200:
172
- return response.json()
173
- else:
174
- print("Error:", response.status_code)
175
-
176
- # Function to ask the user for a prompt, send it, and print the response
177
- def query_chat(self):
178
- while True:
179
- prompt = input("🧑: ")
180
- if prompt.lower() == 'exit':
181
- break
182
-
183
- # Perform web search
184
- search_results = self.web_search(prompt)
185
-
186
- # Pass the search results and the prompt to the AI
187
- self.send_query(f"users question:{prompt} web search results: {search_results} Answer in HelpingAI style**note you have internet access and only use search_results when necessary also dont give links or urls (when users is asking something that needs realtime data)**")
188
- time.sleep(0.25) # Pause for 1 second before asking for the next prompt
189
-
190
- # Close the browser window
191
- def close(self):
192
- self.driver.quit()