webscout 7.5__py3-none-any.whl → 7.7__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/AIauto.py +5 -53
- webscout/AIutel.py +8 -318
- webscout/DWEBS.py +460 -489
- webscout/Extra/YTToolkit/YTdownloader.py +14 -53
- webscout/Extra/YTToolkit/transcriber.py +12 -13
- webscout/Extra/YTToolkit/ytapi/video.py +0 -1
- webscout/Extra/__init__.py +0 -1
- webscout/Extra/autocoder/__init__.py +9 -9
- webscout/Extra/autocoder/autocoder_utiles.py +193 -199
- webscout/Extra/autocoder/rawdog.py +789 -677
- webscout/Extra/gguf.py +682 -428
- webscout/Extra/weather.py +178 -156
- webscout/Extra/weather_ascii.py +70 -17
- webscout/Litlogger/core/logger.py +1 -2
- webscout/Litlogger/handlers/file.py +1 -1
- webscout/Litlogger/styles/formats.py +0 -2
- webscout/Litlogger/utils/detectors.py +0 -1
- webscout/Provider/AISEARCH/DeepFind.py +0 -1
- webscout/Provider/AISEARCH/ISou.py +1 -22
- webscout/Provider/AISEARCH/felo_search.py +0 -1
- webscout/Provider/AllenAI.py +28 -30
- webscout/Provider/C4ai.py +29 -11
- webscout/Provider/ChatGPTClone.py +226 -0
- webscout/Provider/ChatGPTGratis.py +24 -56
- webscout/Provider/DeepSeek.py +25 -17
- webscout/Provider/Deepinfra.py +115 -48
- webscout/Provider/Gemini.py +1 -1
- webscout/Provider/Glider.py +33 -12
- webscout/Provider/HF_space/qwen_qwen2.py +2 -2
- webscout/Provider/HeckAI.py +23 -7
- webscout/Provider/Hunyuan.py +272 -0
- webscout/Provider/Jadve.py +20 -5
- webscout/Provider/LambdaChat.py +391 -0
- webscout/Provider/Netwrck.py +42 -19
- webscout/Provider/OLLAMA.py +256 -32
- webscout/Provider/PI.py +4 -2
- webscout/Provider/Perplexitylabs.py +26 -6
- webscout/Provider/PizzaGPT.py +10 -51
- webscout/Provider/TTI/AiForce/async_aiforce.py +4 -37
- webscout/Provider/TTI/AiForce/sync_aiforce.py +41 -38
- webscout/Provider/TTI/FreeAIPlayground/__init__.py +9 -9
- webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +179 -206
- webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +180 -192
- webscout/Provider/TTI/MagicStudio/__init__.py +2 -0
- webscout/Provider/TTI/MagicStudio/async_magicstudio.py +111 -0
- webscout/Provider/TTI/MagicStudio/sync_magicstudio.py +109 -0
- webscout/Provider/TTI/PollinationsAI/async_pollinations.py +5 -24
- webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +2 -22
- webscout/Provider/TTI/__init__.py +2 -3
- webscout/Provider/TTI/aiarta/async_aiarta.py +14 -14
- webscout/Provider/TTI/aiarta/sync_aiarta.py +52 -21
- webscout/Provider/TTI/artbit/async_artbit.py +3 -32
- webscout/Provider/TTI/artbit/sync_artbit.py +3 -31
- webscout/Provider/TTI/fastflux/__init__.py +22 -0
- webscout/Provider/TTI/fastflux/async_fastflux.py +261 -0
- webscout/Provider/TTI/fastflux/sync_fastflux.py +252 -0
- webscout/Provider/TTI/piclumen/__init__.py +22 -22
- webscout/Provider/TTI/piclumen/sync_piclumen.py +232 -232
- webscout/Provider/TTS/__init__.py +2 -2
- webscout/Provider/TTS/deepgram.py +12 -39
- webscout/Provider/TTS/elevenlabs.py +14 -40
- webscout/Provider/TTS/gesserit.py +11 -35
- webscout/Provider/TTS/murfai.py +13 -39
- webscout/Provider/TTS/parler.py +17 -40
- webscout/Provider/TTS/speechma.py +180 -0
- webscout/Provider/TTS/streamElements.py +17 -44
- webscout/Provider/TextPollinationsAI.py +39 -59
- webscout/Provider/Venice.py +25 -8
- webscout/Provider/WebSim.py +227 -0
- webscout/Provider/WiseCat.py +27 -5
- webscout/Provider/Youchat.py +64 -37
- webscout/Provider/__init__.py +12 -7
- webscout/Provider/akashgpt.py +20 -5
- webscout/Provider/flowith.py +33 -7
- webscout/Provider/freeaichat.py +32 -45
- webscout/Provider/koala.py +20 -5
- webscout/Provider/labyrinth.py +239 -0
- webscout/Provider/learnfastai.py +28 -15
- webscout/Provider/llamatutor.py +1 -1
- webscout/Provider/llmchat.py +30 -8
- webscout/Provider/multichat.py +65 -9
- webscout/Provider/sonus.py +208 -0
- webscout/Provider/talkai.py +1 -0
- webscout/Provider/turboseek.py +3 -0
- webscout/Provider/tutorai.py +2 -0
- webscout/Provider/typegpt.py +155 -65
- webscout/Provider/uncovr.py +297 -0
- webscout/Provider/x0gpt.py +3 -1
- webscout/Provider/yep.py +102 -20
- webscout/__init__.py +3 -0
- webscout/cli.py +53 -40
- webscout/conversation.py +1 -10
- webscout/litagent/__init__.py +2 -2
- webscout/litagent/agent.py +356 -20
- webscout/litagent/constants.py +34 -5
- webscout/litprinter/__init__.py +0 -3
- webscout/models.py +181 -0
- webscout/optimizers.py +1 -1
- webscout/prompt_manager.py +2 -8
- webscout/scout/core/scout.py +1 -4
- webscout/scout/core/search_result.py +1 -1
- webscout/scout/core/text_utils.py +1 -1
- webscout/scout/core.py +2 -5
- webscout/scout/element.py +1 -1
- webscout/scout/parsers/html_parser.py +1 -1
- webscout/scout/utils.py +0 -1
- webscout/swiftcli/__init__.py +1 -3
- webscout/tempid.py +1 -1
- webscout/update_checker.py +1 -3
- webscout/version.py +1 -1
- webscout/webscout_search_async.py +1 -2
- webscout/yep_search.py +297 -297
- {webscout-7.5.dist-info → webscout-7.7.dist-info}/LICENSE.md +4 -4
- {webscout-7.5.dist-info → webscout-7.7.dist-info}/METADATA +127 -405
- {webscout-7.5.dist-info → webscout-7.7.dist-info}/RECORD +118 -117
- webscout/Extra/autollama.py +0 -231
- webscout/Provider/Amigo.py +0 -274
- webscout/Provider/Bing.py +0 -243
- webscout/Provider/DiscordRocks.py +0 -253
- webscout/Provider/TTI/blackbox/__init__.py +0 -4
- webscout/Provider/TTI/blackbox/async_blackbox.py +0 -212
- webscout/Provider/TTI/blackbox/sync_blackbox.py +0 -199
- webscout/Provider/TTI/deepinfra/__init__.py +0 -4
- webscout/Provider/TTI/deepinfra/async_deepinfra.py +0 -227
- webscout/Provider/TTI/deepinfra/sync_deepinfra.py +0 -199
- webscout/Provider/TTI/imgninza/__init__.py +0 -4
- webscout/Provider/TTI/imgninza/async_ninza.py +0 -214
- webscout/Provider/TTI/imgninza/sync_ninza.py +0 -209
- webscout/Provider/TTS/voicepod.py +0 -117
- {webscout-7.5.dist-info → webscout-7.7.dist-info}/WHEEL +0 -0
- {webscout-7.5.dist-info → webscout-7.7.dist-info}/entry_points.txt +0 -0
- {webscout-7.5.dist-info → webscout-7.7.dist-info}/top_level.txt +0 -0
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
import json
|
|
3
|
-
from webscout.Litlogger import Logger
|
|
4
3
|
from webscout.litagent import LitAgent
|
|
5
4
|
from time import sleep
|
|
6
5
|
import requests
|
|
7
6
|
from tqdm import tqdm
|
|
8
7
|
from colorama import Fore
|
|
9
|
-
from os import makedirs, path, getcwd
|
|
8
|
+
from os import makedirs, path, getcwd
|
|
10
9
|
from threading import Thread
|
|
11
|
-
from sys import stdout
|
|
12
10
|
import os
|
|
13
11
|
import subprocess
|
|
14
12
|
import sys
|
|
15
13
|
import tempfile
|
|
16
14
|
from webscout.version import __prog__, __version__
|
|
17
|
-
from webscout.swiftcli import CLI, option, argument
|
|
15
|
+
from webscout.swiftcli import CLI, option, argument
|
|
18
16
|
|
|
19
17
|
# Define cache directory using tempfile
|
|
20
18
|
user_cache_dir = os.path.join(tempfile.gettempdir(), 'webscout')
|
|
21
19
|
if not os.path.exists(user_cache_dir):
|
|
22
20
|
os.makedirs(user_cache_dir)
|
|
23
21
|
|
|
24
|
-
logging = Logger(name="YTDownloader")
|
|
25
22
|
|
|
26
23
|
session = requests.session()
|
|
27
24
|
|
|
@@ -63,13 +60,10 @@ class utils:
|
|
|
63
60
|
return func(*args, **kwargs)
|
|
64
61
|
except KeyboardInterrupt as e:
|
|
65
62
|
print()
|
|
66
|
-
logging.info(f"^KeyboardInterrupt quitting. Goodbye!")
|
|
67
63
|
exit(1)
|
|
68
64
|
except Exception as e:
|
|
69
65
|
if log:
|
|
70
|
-
|
|
71
|
-
logging.debug(f"Function ({func.__name__}) : {get_excep(e)}")
|
|
72
|
-
logging.error(get_excep(e))
|
|
66
|
+
raise(f"Error - {get_excep(e)}")
|
|
73
67
|
if exit_on_error:
|
|
74
68
|
exit(1)
|
|
75
69
|
|
|
@@ -110,7 +104,7 @@ class utils:
|
|
|
110
104
|
with open(history_path, "w") as fh:
|
|
111
105
|
json.dump({__prog__: saved_data}, fh, indent=4)
|
|
112
106
|
except Exception as e:
|
|
113
|
-
|
|
107
|
+
pass
|
|
114
108
|
|
|
115
109
|
@staticmethod
|
|
116
110
|
def get_history(dump: bool = False) -> list:
|
|
@@ -133,7 +127,6 @@ class utils:
|
|
|
133
127
|
resp.append(entry.get("vid"))
|
|
134
128
|
return resp
|
|
135
129
|
except Exception as e:
|
|
136
|
-
logging.error(f"Failed to load history - {get_excep(e)}")
|
|
137
130
|
return []
|
|
138
131
|
|
|
139
132
|
|
|
@@ -185,7 +178,6 @@ class first_query:
|
|
|
185
178
|
:param timeout: (Optional) Http requests timeout
|
|
186
179
|
:type timeout: int
|
|
187
180
|
"""
|
|
188
|
-
logging.debug(f"Making first query : {self.payload.get('k_query')}")
|
|
189
181
|
okay_status, resp = utils.post(self.url, data=self.payload, timeout=timeout)
|
|
190
182
|
# print(resp.headers["content-type"])
|
|
191
183
|
# print(resp.content)
|
|
@@ -197,8 +189,9 @@ class first_query:
|
|
|
197
189
|
self.is_link = not hasattr(self, "vitems")
|
|
198
190
|
self.processed = True
|
|
199
191
|
else:
|
|
200
|
-
|
|
201
|
-
|
|
192
|
+
raise Exception(
|
|
193
|
+
f"First query failed - [{resp.status_code} : {resp.reason}]"
|
|
194
|
+
)
|
|
202
195
|
return self
|
|
203
196
|
|
|
204
197
|
|
|
@@ -321,9 +314,6 @@ class second_query:
|
|
|
321
314
|
self.__setattr__("raw", dict_data)
|
|
322
315
|
self.processed = True
|
|
323
316
|
|
|
324
|
-
else:
|
|
325
|
-
logging.debug(f"{resp.headers.get('content-type')} - {resp.content}")
|
|
326
|
-
logging.error(f"Second query failed - [{resp.status_code} : {resp.reason}]")
|
|
327
317
|
return self
|
|
328
318
|
|
|
329
319
|
|
|
@@ -430,9 +420,6 @@ class third_query:
|
|
|
430
420
|
if repeat_count >= 4:
|
|
431
421
|
return (False, {})
|
|
432
422
|
else:
|
|
433
|
-
logging.debug(
|
|
434
|
-
f"Converting video : sleeping for 5s - round {repeat_count+1}"
|
|
435
|
-
)
|
|
436
423
|
sleep(5)
|
|
437
424
|
repeat_count += 1
|
|
438
425
|
return hunter_manager(souped_entry)
|
|
@@ -447,15 +434,8 @@ class third_query:
|
|
|
447
434
|
return resp_data
|
|
448
435
|
|
|
449
436
|
else:
|
|
450
|
-
logging.debug(f"{resp.headers.get('content-type')} - {resp.content}")
|
|
451
|
-
logging.error(
|
|
452
|
-
f"Third query failed - [{resp.status_code} : {resp.reason}]"
|
|
453
|
-
)
|
|
454
437
|
return {}
|
|
455
438
|
else:
|
|
456
|
-
logging.error(
|
|
457
|
-
f"Zero media hunted with params : {{quality : {quality}, format : {format} }}"
|
|
458
|
-
)
|
|
459
439
|
return {}
|
|
460
440
|
|
|
461
441
|
|
|
@@ -567,16 +547,10 @@ class Handler:
|
|
|
567
547
|
if query_2.vid in self.dropped:
|
|
568
548
|
continue
|
|
569
549
|
if self.author and not self.author.lower() in query_2.a.lower():
|
|
570
|
-
logging.warning(
|
|
571
|
-
f"Dropping {Fore.YELLOW+query_2.title+Fore.RESET} by {Fore.RED+query_2.a+Fore.RESET}"
|
|
572
|
-
)
|
|
573
550
|
continue
|
|
574
551
|
else:
|
|
575
552
|
yes_download, reason = self.__verify_item(query_2)
|
|
576
553
|
if not yes_download:
|
|
577
|
-
logging.warning(
|
|
578
|
-
f"Skipping {Fore.YELLOW+query_2.title+Fore.RESET} by {Fore.MAGENTA+query_2.a+Fore.RESET} - Reason : {Fore.BLUE+reason+Fore.RESET}"
|
|
579
|
-
)
|
|
580
554
|
self.dropped.append(query_2.vid)
|
|
581
555
|
continue
|
|
582
556
|
self.related.append(query_2.related)
|
|
@@ -585,9 +559,10 @@ class Handler:
|
|
|
585
559
|
if x >= self.total:
|
|
586
560
|
break
|
|
587
561
|
else:
|
|
588
|
-
|
|
562
|
+
print(
|
|
589
563
|
f"Dropping unprocessed query_two object of index {x}"
|
|
590
564
|
)
|
|
565
|
+
yield
|
|
591
566
|
|
|
592
567
|
else:
|
|
593
568
|
query_2 = init_query_two.main(timeout=self.timeout)
|
|
@@ -606,16 +581,11 @@ class Handler:
|
|
|
606
581
|
self.author
|
|
607
582
|
and not self.author.lower() in query_2.a.lower()
|
|
608
583
|
):
|
|
609
|
-
logging.warning(
|
|
610
|
-
f"Dropping {Fore.YELLOW+query_2.title+Fore.RESET} by {Fore.RED+query_2.a+Fore.RESET}"
|
|
611
|
-
)
|
|
612
584
|
continue
|
|
613
585
|
else:
|
|
614
586
|
yes_download, reason = self.__verify_item(query_2)
|
|
615
587
|
if not yes_download:
|
|
616
|
-
|
|
617
|
-
f"Skipping {Fore.YELLOW+query_2.title+Fore.RESET} by {Fore.MAGENTA+query_2.a+Fore.RESET} - Reason : {Fore.BLUE+reason+Fore.RESET}"
|
|
618
|
-
)
|
|
588
|
+
|
|
619
589
|
self.dropped.append(query_2.vid)
|
|
620
590
|
continue
|
|
621
591
|
|
|
@@ -625,12 +595,8 @@ class Handler:
|
|
|
625
595
|
if x >= self.total:
|
|
626
596
|
break
|
|
627
597
|
else:
|
|
628
|
-
logging.warning(
|
|
629
|
-
f"Dropping unprocessed query_two object of index {x}"
|
|
630
|
-
)
|
|
631
598
|
yield
|
|
632
599
|
else:
|
|
633
|
-
logging.warning("Dropping unprocessed query_two object")
|
|
634
600
|
yield
|
|
635
601
|
|
|
636
602
|
def run(
|
|
@@ -670,8 +636,7 @@ class Handler:
|
|
|
670
636
|
timeout=self.timeout,
|
|
671
637
|
)
|
|
672
638
|
)
|
|
673
|
-
|
|
674
|
-
logging.error(f"Empty object - {query_two_obj}")
|
|
639
|
+
|
|
675
640
|
|
|
676
641
|
def generate_filename(self, third_dict: dict, naming_format: str = None) -> str:
|
|
677
642
|
r"""Generate filename based on the response of `third_query`
|
|
@@ -760,9 +725,6 @@ class Handler:
|
|
|
760
725
|
t1.start()
|
|
761
726
|
thread_count = x + 1
|
|
762
727
|
if thread_count % self.thread == 0 or thread_count == self.total:
|
|
763
|
-
logging.debug(
|
|
764
|
-
f"Waiting for current running threads to finish - thread_count : {thread_count}"
|
|
765
|
-
)
|
|
766
728
|
t1.join()
|
|
767
729
|
else:
|
|
768
730
|
self.save(
|
|
@@ -814,7 +776,7 @@ class Handler:
|
|
|
814
776
|
"dlink"
|
|
815
777
|
), "The video selected does not support that quality, try lower qualities."
|
|
816
778
|
if third_dict.get("mess"):
|
|
817
|
-
|
|
779
|
+
pass
|
|
818
780
|
|
|
819
781
|
current_downloaded_size = 0
|
|
820
782
|
current_downloaded_size_in_mb = 0
|
|
@@ -892,10 +854,9 @@ class Handler:
|
|
|
892
854
|
utils.add_history(third_dict)
|
|
893
855
|
|
|
894
856
|
try_play_media()
|
|
895
|
-
|
|
857
|
+
|
|
896
858
|
return save_to
|
|
897
|
-
|
|
898
|
-
logging.error(f"Empty `third_dict` parameter parsed : {third_dict}")
|
|
859
|
+
|
|
899
860
|
|
|
900
861
|
|
|
901
862
|
mp4_qualities = [
|
|
@@ -6,23 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
import requests
|
|
10
|
-
import http.cookiejar as cookiejar
|
|
11
|
-
import json
|
|
12
|
-
from xml.etree import ElementTree
|
|
13
|
-
import re
|
|
14
|
-
import html
|
|
15
|
-
from typing import List, Dict, Union, Optional
|
|
16
|
-
from functools import lru_cache #
|
|
17
|
-
from concurrent.futures import ThreadPoolExecutor
|
|
18
|
-
import
|
|
19
|
-
from webscout.exceptions import * # All our custom exceptions 🛠️
|
|
9
|
+
import requests
|
|
10
|
+
import http.cookiejar as cookiejar
|
|
11
|
+
import json
|
|
12
|
+
from xml.etree import ElementTree
|
|
13
|
+
import re
|
|
14
|
+
import html
|
|
15
|
+
from typing import List, Dict, Union, Optional
|
|
16
|
+
from functools import lru_cache #
|
|
17
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
18
|
+
from webscout.exceptions import *
|
|
20
19
|
|
|
21
20
|
WATCH_URL = 'https://www.youtube.com/watch?v={video_id}'
|
|
22
|
-
MAX_WORKERS = 4
|
|
21
|
+
MAX_WORKERS = 4
|
|
23
22
|
|
|
24
23
|
class YTTranscriber:
|
|
25
|
-
"""
|
|
24
|
+
"""Transcribe YouTube videos with style! 🎤
|
|
26
25
|
|
|
27
26
|
>>> transcript = YTTranscriber.get_transcript('https://youtu.be/dQw4w9WgXcQ')
|
|
28
27
|
>>> print(transcript[0]['text'])
|
webscout/Extra/__init__.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"""
|
|
2
|
-
AutoCoder Module - Part of Webscout
|
|
3
|
-
Provides automated code generation and manipulation capabilities.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from .rawdog import *
|
|
7
|
-
from .autocoder_utiles import *
|
|
8
|
-
|
|
9
|
-
# __all__ = [] # Add your public module names here
|
|
1
|
+
"""
|
|
2
|
+
AutoCoder Module - Part of Webscout
|
|
3
|
+
Provides automated code generation and manipulation capabilities.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from .rawdog import *
|
|
7
|
+
from .autocoder_utiles import *
|
|
8
|
+
|
|
9
|
+
# __all__ = [] # Add your public module names here
|