webscout 6.8__py3-none-any.whl → 6.9__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/Extra/YTToolkit/YTdownloader.py +7 -2
- webscout/Extra/YTToolkit/ytapi/channel.py +1 -1
- webscout/Extra/YTToolkit/ytapi/query.py +3 -0
- webscout/Extra/YTToolkit/ytapi/stream.py +3 -0
- webscout/Extra/YTToolkit/ytapi/video.py +3 -1
- webscout/Provider/__init__.py +0 -2
- webscout/Provider/cerebras.py +3 -3
- webscout/__init__.py +0 -1
- webscout/swiftcli/__init__.py +1 -0
- webscout/version.py +1 -1
- webscout/webscout_search.py +1140 -1104
- webscout/webscout_search_async.py +635 -361
- {webscout-6.8.dist-info → webscout-6.9.dist-info}/METADATA +4 -32
- {webscout-6.8.dist-info → webscout-6.9.dist-info}/RECORD +18 -21
- webscout/Extra/markdownlite/__init__.py +0 -862
- webscout/Provider/Deepseek.py +0 -227
- webscout/zerodir/__init__.py +0 -225
- {webscout-6.8.dist-info → webscout-6.9.dist-info}/LICENSE.md +0 -0
- {webscout-6.8.dist-info → webscout-6.9.dist-info}/WHEEL +0 -0
- {webscout-6.8.dist-info → webscout-6.9.dist-info}/entry_points.txt +0 -0
- {webscout-6.8.dist-info → webscout-6.9.dist-info}/top_level.txt +0 -0
|
@@ -12,10 +12,15 @@ from sys import stdout
|
|
|
12
12
|
import os
|
|
13
13
|
import subprocess
|
|
14
14
|
import sys
|
|
15
|
+
import tempfile
|
|
15
16
|
from webscout.version import __prog__, __version__
|
|
16
|
-
from webscout.zerodir import user_cache_dir
|
|
17
17
|
from webscout.swiftcli import CLI, option, argument, group
|
|
18
18
|
|
|
19
|
+
# Define cache directory using tempfile
|
|
20
|
+
user_cache_dir = os.path.join(tempfile.gettempdir(), 'webscout')
|
|
21
|
+
if not os.path.exists(user_cache_dir):
|
|
22
|
+
os.makedirs(user_cache_dir)
|
|
23
|
+
|
|
19
24
|
logging = LitLogger(name="YTDownloader")
|
|
20
25
|
|
|
21
26
|
session = requests.session()
|
|
@@ -32,7 +37,7 @@ session.headers.update(headers)
|
|
|
32
37
|
|
|
33
38
|
get_excep = lambda e: e.args[1] if len(e.args) > 1 else e
|
|
34
39
|
|
|
35
|
-
appdir = user_cache_dir
|
|
40
|
+
appdir = user_cache_dir
|
|
36
41
|
|
|
37
42
|
if not path.isdir(appdir):
|
|
38
43
|
try:
|
|
@@ -99,4 +99,6 @@ class Video:
|
|
|
99
99
|
data['genre'] = genre_pattern.search(self._video_data).group(1)
|
|
100
100
|
except AttributeError:
|
|
101
101
|
data['genre'] = None
|
|
102
|
-
return data
|
|
102
|
+
return data
|
|
103
|
+
if __name__ == '__main__':
|
|
104
|
+
print(Video('https://www.youtube.com/watch?v=9bZkp7q19f0').metadata)
|
webscout/Provider/__init__.py
CHANGED
|
@@ -14,7 +14,6 @@ from .Phind import PhindSearch
|
|
|
14
14
|
from .Phind import Phindv2
|
|
15
15
|
from .ai4chat import *
|
|
16
16
|
from .Gemini import GEMINI
|
|
17
|
-
from .Deepseek import DeepSeek
|
|
18
17
|
from .Deepinfra import DeepInfra
|
|
19
18
|
from .cleeai import *
|
|
20
19
|
from .OLLAMA import OLLAMA
|
|
@@ -74,7 +73,6 @@ __all__ = [
|
|
|
74
73
|
'BLACKBOXAI',
|
|
75
74
|
'PhindSearch',
|
|
76
75
|
'GEMINI',
|
|
77
|
-
'DeepSeek',
|
|
78
76
|
'DeepInfra',
|
|
79
77
|
'AI4Chat',
|
|
80
78
|
'Phindv2',
|
webscout/Provider/cerebras.py
CHANGED
|
@@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Generator, List, Union
|
|
|
6
6
|
from webscout.AIutel import Optimizers, Conversation, AwesomePrompts
|
|
7
7
|
from webscout.AIbase import Provider
|
|
8
8
|
from webscout import exceptions
|
|
9
|
-
from
|
|
9
|
+
from webscout import LitAgent as UserAgent
|
|
10
10
|
|
|
11
11
|
class Cerebras(Provider):
|
|
12
12
|
"""
|
|
@@ -89,7 +89,7 @@ class Cerebras(Provider):
|
|
|
89
89
|
"Content-Type": "application/json",
|
|
90
90
|
"Origin": "https://inference.cerebras.ai",
|
|
91
91
|
"Referer": "https://inference.cerebras.ai/",
|
|
92
|
-
"user-agent": UserAgent().random,
|
|
92
|
+
"user-agent": UserAgent().random(),
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
json_data = {
|
|
@@ -119,7 +119,7 @@ class Cerebras(Provider):
|
|
|
119
119
|
headers = {
|
|
120
120
|
"Authorization": f"Bearer {self.api_key}",
|
|
121
121
|
"Content-Type": "application/json",
|
|
122
|
-
"User-Agent": UserAgent().random
|
|
122
|
+
"User-Agent": UserAgent().random(),
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
payload = {
|
webscout/__init__.py
CHANGED
webscout/swiftcli/__init__.py
CHANGED
webscout/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "6.
|
|
1
|
+
__version__ = "6.9"
|
|
2
2
|
__prog__ = "webscout"
|