abstract-webtools 0.1.6.96__tar.gz → 0.1.6.98__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.
Files changed (51) hide show
  1. abstract_webtools-0.1.6.98/PKG-INFO +196 -0
  2. abstract_webtools-0.1.6.98/README.md +168 -0
  3. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/setup.py +1 -1
  4. abstract_webtools-0.1.6.98/src/abstract_webtools/k2s_downloader.py +129 -0
  5. abstract_webtools-0.1.6.98/src/abstract_webtools.egg-info/PKG-INFO +196 -0
  6. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools.egg-info/SOURCES.txt +1 -0
  7. abstract_webtools-0.1.6.96/PKG-INFO +0 -455
  8. abstract_webtools-0.1.6.96/README.md +0 -427
  9. abstract_webtools-0.1.6.96/src/abstract_webtools.egg-info/PKG-INFO +0 -455
  10. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/pyproject.toml +0 -0
  11. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/setup.cfg +0 -0
  12. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/__init__.py +0 -0
  13. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/abstract_usurpit.py +0 -0
  14. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/abstract_webtools.py +0 -0
  15. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/big_user_agent_list.py +0 -0
  16. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/domain_identifier.py +0 -0
  17. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/extention_list.py +0 -0
  18. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/find_dirs.py +0 -0
  19. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/main.py +0 -0
  20. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/__init__.py +0 -0
  21. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/allss//.py" +0 -0
  22. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/cipherManager.py +0 -0
  23. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/crawlManager.py +0 -0
  24. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/crawlmgr2.py +0 -0
  25. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/curlMgr.py +0 -0
  26. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/domainManager.py +0 -0
  27. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/dynamicRateLimiter.py +0 -0
  28. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/get_test.py +0 -0
  29. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/linkManager/__init__.py +0 -0
  30. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/linkManager/linkManager.py +0 -0
  31. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/mySocketClient.py +0 -0
  32. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/networkManager.py +0 -0
  33. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/requestManager/__init__.py +0 -0
  34. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/requestManager/requestManager.py +0 -0
  35. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/seleniumManager.py +0 -0
  36. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/soupManager/__init__.py +0 -0
  37. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/soupManager/asoueces.py +0 -0
  38. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/soupManager/soupManager.py +0 -0
  39. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/sslManager.py +0 -0
  40. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/tlsAdapter.py +0 -0
  41. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/urlManager/__init__.py +0 -0
  42. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/urlManager/urlManager.py +0 -0
  43. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/userAgentManager.py +0 -0
  44. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/videoDownloader.py +0 -0
  45. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/managers/videoDownloader2.py +0 -0
  46. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/soup_gui.py +0 -0
  47. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/url_grabber.py +0 -0
  48. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools/url_grabber_new.py +0 -0
  49. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools.egg-info/dependency_links.txt +0 -0
  50. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools.egg-info/requires.txt +0 -0
  51. {abstract_webtools-0.1.6.96 → abstract_webtools-0.1.6.98}/src/abstract_webtools.egg-info/top_level.txt +0 -0
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.4
2
+ Name: abstract_webtools
3
+ Version: 0.1.6.98
4
+ Summary: Abstract Web Tools is a Python package that provides various utility functions for web scraping tasks. It is built on top of popular libraries such as `requests`, `BeautifulSoup`, and `urllib3` to simplify the process of fetching and parsing web content.
5
+ Home-page: https://github.com/AbstractEndeavors/abstract_essentials/tree/main/abstract_webtools
6
+ Author: putkoff
7
+ Author-email: partners@abstractendeavors.com
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Requires-Python: >=3.6
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: abstract_utilities>=0.2.2.30
16
+ Requires-Dist: PySimpleGUI>=4.60.5
17
+ Requires-Dist: urllib3>=2.0.4
18
+ Requires-Dist: requests>=2.31.0
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: requires-dist
26
+ Dynamic: requires-python
27
+ Dynamic: summary
28
+
29
+ # Unknown Package (vUnknown Version)
30
+
31
+ No description available
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ pip install Unknown Package
37
+ ```
38
+
39
+ ## Dependencies
40
+
41
+ None
42
+
43
+ ## Modules
44
+
45
+ ### src/abstract_webtools/url_grabber.py
46
+
47
+ Description of script based on prompt: You are analyzing a Python script 'url_grabber.py' (mock response)
48
+
49
+ ### src/abstract_webtools/managers/__init__.py
50
+
51
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
52
+
53
+ ### src/abstract_webtools/managers/cipherManager.py
54
+
55
+ Description of script based on prompt: You are analyzing a Python script 'cipherManager.p (mock response)
56
+
57
+ ### src/abstract_webtools/managers/linkManager/__init__.py
58
+
59
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
60
+
61
+ ### src/abstract_webtools/managers/videoDownloader.py
62
+
63
+ Description of script based on prompt: You are analyzing a Python script 'videoDownloader (mock response)
64
+
65
+ ### src/abstract_webtools/managers/tlsAdapter.py
66
+
67
+ Description of script based on prompt: You are analyzing a Python script 'tlsAdapter.py' (mock response)
68
+
69
+ ### src/abstract_webtools/managers/soupManager/soupManager.py
70
+
71
+ Description of script based on prompt: You are analyzing a Python script 'soupManager.py' (mock response)
72
+
73
+ ### src/abstract_webtools/managers/urlManager/__init__.py
74
+
75
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
76
+
77
+ ### src/abstract_webtools/url_grabber_new.py
78
+
79
+ Description of script based on prompt: You are analyzing a Python script 'url_grabber_new (mock response)
80
+
81
+ ### src/abstract_webtools/managers/requestManager/__init__.py
82
+
83
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
84
+
85
+ ### src/abstract_webtools/managers/get_test.py
86
+
87
+ Description of script based on prompt: You are analyzing a Python script 'get_test.py' lo (mock response)
88
+
89
+ ### src/abstract_webtools/__init__.py
90
+
91
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
92
+
93
+ ### src/abstract_webtools/managers/seleniumManager.py
94
+
95
+ Description of script based on prompt: You are analyzing a Python script 'seleniumManager (mock response)
96
+
97
+ ### src/abstract_webtools/managers/crawlManager.py
98
+
99
+ Description of script based on prompt: You are analyzing a Python script 'crawlManager.py (mock response)
100
+
101
+ ### src/abstract_webtools/managers/requestManager/requestManager.py
102
+
103
+ Description of script based on prompt: You are analyzing a Python script 'requestManager. (mock response)
104
+
105
+ ### src/abstract_webtools/managers/videoDownloader2.py
106
+
107
+ Description of script based on prompt: You are analyzing a Python script 'videoDownloader (mock response)
108
+
109
+ ### src/abstract_webtools/managers/soupManager/__init__.py
110
+
111
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
112
+
113
+ ### src/abstract_webtools/main.py
114
+
115
+ Description of script based on prompt: You are analyzing a Python script 'main.py' locate (mock response)
116
+
117
+ ### src/testit.py
118
+
119
+ Description of script based on prompt: You are analyzing a Python script 'testit.py' loca (mock response)
120
+
121
+ ### src/abstract_webtools/soup_gui.py
122
+
123
+ Description of script based on prompt: You are analyzing a Python script 'soup_gui.py' lo (mock response)
124
+
125
+ ### src/abstract_webtools/managers/curlMgr.py
126
+
127
+ Description of script based on prompt: You are analyzing a Python script 'curlMgr.py' loc (mock response)
128
+
129
+ ### src/abstract_webtools/managers/sslManager.py
130
+
131
+ Description of script based on prompt: You are analyzing a Python script 'sslManager.py' (mock response)
132
+
133
+ ### src/abstract_webtools/managers/dynamicRateLimiter.py
134
+
135
+ Description of script based on prompt: You are analyzing a Python script 'dynamicRateLimi (mock response)
136
+
137
+ ### src/abstract_webtools/managers/mySocketClient.py
138
+
139
+ Description of script based on prompt: You are analyzing a Python script 'mySocketClient. (mock response)
140
+
141
+ ### src/abstract_webtools/managers/linkManager/linkManager.py
142
+
143
+ Description of script based on prompt: You are analyzing a Python script 'linkManager.py' (mock response)
144
+
145
+ ### src/abstract_webtools/managers/userAgentManager.py
146
+
147
+ Description of script based on prompt: You are analyzing a Python script 'userAgentManage (mock response)
148
+
149
+ ### src/abstract_webtools/extention_list.py
150
+
151
+ Description of script based on prompt: You are analyzing a Python script 'extention_list. (mock response)
152
+
153
+ ### src/abstract_webtools/managers/networkManager.py
154
+
155
+ Description of script based on prompt: You are analyzing a Python script 'networkManager. (mock response)
156
+
157
+ ### src/abstract_webtools/managers/domainManager.py
158
+
159
+ Description of script based on prompt: You are analyzing a Python script 'domainManager.p (mock response)
160
+
161
+ ### src/abstract_webtools/managers/urlManager/urlManager.py
162
+
163
+ Description of script based on prompt: You are analyzing a Python script 'urlManager.py' (mock response)
164
+
165
+ ### src/abstract_webtools/big_user_agent_list.py
166
+
167
+ Description of script based on prompt: You are analyzing a Python script 'big_user_agent_ (mock response)
168
+
169
+ ### src/abstract_webtools/abstract_usurpit.py
170
+
171
+ Description of script based on prompt: You are analyzing a Python script 'abstract_usurpi (mock response)
172
+
173
+ ### src/abstract_webtools/managers/soupManager/asoueces.py
174
+
175
+ Description of script based on prompt: You are analyzing a Python script 'asoueces.py' lo (mock response)
176
+
177
+ ### src/abstract_webtools/managers/crawlmgr2.py
178
+
179
+ Description of script based on prompt: You are analyzing a Python script 'crawlmgr2.py' l (mock response)
180
+
181
+ ### src/abstract_webtools/abstract_webtools.py
182
+
183
+ Description of script based on prompt: You are analyzing a Python script 'abstract_webtoo (mock response)
184
+
185
+ ### src/abstract_webtools/find_dirs.py
186
+
187
+ Description of script based on prompt: You are analyzing a Python script 'find_dirs.py' l (mock response)
188
+
189
+ ### src/abstract_webtools/domain_identifier.py
190
+
191
+ Description of script based on prompt: You are analyzing a Python script 'domain_identifi (mock response)
192
+
193
+ ### src/abstract_webtools/managers/allss\.py
194
+
195
+ Description of script based on prompt: You are analyzing a Python script 'allss\.py' loca (mock response)
196
+
@@ -0,0 +1,168 @@
1
+ # Unknown Package (vUnknown Version)
2
+
3
+ No description available
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install Unknown Package
9
+ ```
10
+
11
+ ## Dependencies
12
+
13
+ None
14
+
15
+ ## Modules
16
+
17
+ ### src/abstract_webtools/url_grabber.py
18
+
19
+ Description of script based on prompt: You are analyzing a Python script 'url_grabber.py' (mock response)
20
+
21
+ ### src/abstract_webtools/managers/__init__.py
22
+
23
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
24
+
25
+ ### src/abstract_webtools/managers/cipherManager.py
26
+
27
+ Description of script based on prompt: You are analyzing a Python script 'cipherManager.p (mock response)
28
+
29
+ ### src/abstract_webtools/managers/linkManager/__init__.py
30
+
31
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
32
+
33
+ ### src/abstract_webtools/managers/videoDownloader.py
34
+
35
+ Description of script based on prompt: You are analyzing a Python script 'videoDownloader (mock response)
36
+
37
+ ### src/abstract_webtools/managers/tlsAdapter.py
38
+
39
+ Description of script based on prompt: You are analyzing a Python script 'tlsAdapter.py' (mock response)
40
+
41
+ ### src/abstract_webtools/managers/soupManager/soupManager.py
42
+
43
+ Description of script based on prompt: You are analyzing a Python script 'soupManager.py' (mock response)
44
+
45
+ ### src/abstract_webtools/managers/urlManager/__init__.py
46
+
47
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
48
+
49
+ ### src/abstract_webtools/url_grabber_new.py
50
+
51
+ Description of script based on prompt: You are analyzing a Python script 'url_grabber_new (mock response)
52
+
53
+ ### src/abstract_webtools/managers/requestManager/__init__.py
54
+
55
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
56
+
57
+ ### src/abstract_webtools/managers/get_test.py
58
+
59
+ Description of script based on prompt: You are analyzing a Python script 'get_test.py' lo (mock response)
60
+
61
+ ### src/abstract_webtools/__init__.py
62
+
63
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
64
+
65
+ ### src/abstract_webtools/managers/seleniumManager.py
66
+
67
+ Description of script based on prompt: You are analyzing a Python script 'seleniumManager (mock response)
68
+
69
+ ### src/abstract_webtools/managers/crawlManager.py
70
+
71
+ Description of script based on prompt: You are analyzing a Python script 'crawlManager.py (mock response)
72
+
73
+ ### src/abstract_webtools/managers/requestManager/requestManager.py
74
+
75
+ Description of script based on prompt: You are analyzing a Python script 'requestManager. (mock response)
76
+
77
+ ### src/abstract_webtools/managers/videoDownloader2.py
78
+
79
+ Description of script based on prompt: You are analyzing a Python script 'videoDownloader (mock response)
80
+
81
+ ### src/abstract_webtools/managers/soupManager/__init__.py
82
+
83
+ Description of script based on prompt: You are analyzing a Python script '__init__.py' lo (mock response)
84
+
85
+ ### src/abstract_webtools/main.py
86
+
87
+ Description of script based on prompt: You are analyzing a Python script 'main.py' locate (mock response)
88
+
89
+ ### src/testit.py
90
+
91
+ Description of script based on prompt: You are analyzing a Python script 'testit.py' loca (mock response)
92
+
93
+ ### src/abstract_webtools/soup_gui.py
94
+
95
+ Description of script based on prompt: You are analyzing a Python script 'soup_gui.py' lo (mock response)
96
+
97
+ ### src/abstract_webtools/managers/curlMgr.py
98
+
99
+ Description of script based on prompt: You are analyzing a Python script 'curlMgr.py' loc (mock response)
100
+
101
+ ### src/abstract_webtools/managers/sslManager.py
102
+
103
+ Description of script based on prompt: You are analyzing a Python script 'sslManager.py' (mock response)
104
+
105
+ ### src/abstract_webtools/managers/dynamicRateLimiter.py
106
+
107
+ Description of script based on prompt: You are analyzing a Python script 'dynamicRateLimi (mock response)
108
+
109
+ ### src/abstract_webtools/managers/mySocketClient.py
110
+
111
+ Description of script based on prompt: You are analyzing a Python script 'mySocketClient. (mock response)
112
+
113
+ ### src/abstract_webtools/managers/linkManager/linkManager.py
114
+
115
+ Description of script based on prompt: You are analyzing a Python script 'linkManager.py' (mock response)
116
+
117
+ ### src/abstract_webtools/managers/userAgentManager.py
118
+
119
+ Description of script based on prompt: You are analyzing a Python script 'userAgentManage (mock response)
120
+
121
+ ### src/abstract_webtools/extention_list.py
122
+
123
+ Description of script based on prompt: You are analyzing a Python script 'extention_list. (mock response)
124
+
125
+ ### src/abstract_webtools/managers/networkManager.py
126
+
127
+ Description of script based on prompt: You are analyzing a Python script 'networkManager. (mock response)
128
+
129
+ ### src/abstract_webtools/managers/domainManager.py
130
+
131
+ Description of script based on prompt: You are analyzing a Python script 'domainManager.p (mock response)
132
+
133
+ ### src/abstract_webtools/managers/urlManager/urlManager.py
134
+
135
+ Description of script based on prompt: You are analyzing a Python script 'urlManager.py' (mock response)
136
+
137
+ ### src/abstract_webtools/big_user_agent_list.py
138
+
139
+ Description of script based on prompt: You are analyzing a Python script 'big_user_agent_ (mock response)
140
+
141
+ ### src/abstract_webtools/abstract_usurpit.py
142
+
143
+ Description of script based on prompt: You are analyzing a Python script 'abstract_usurpi (mock response)
144
+
145
+ ### src/abstract_webtools/managers/soupManager/asoueces.py
146
+
147
+ Description of script based on prompt: You are analyzing a Python script 'asoueces.py' lo (mock response)
148
+
149
+ ### src/abstract_webtools/managers/crawlmgr2.py
150
+
151
+ Description of script based on prompt: You are analyzing a Python script 'crawlmgr2.py' l (mock response)
152
+
153
+ ### src/abstract_webtools/abstract_webtools.py
154
+
155
+ Description of script based on prompt: You are analyzing a Python script 'abstract_webtoo (mock response)
156
+
157
+ ### src/abstract_webtools/find_dirs.py
158
+
159
+ Description of script based on prompt: You are analyzing a Python script 'find_dirs.py' l (mock response)
160
+
161
+ ### src/abstract_webtools/domain_identifier.py
162
+
163
+ Description of script based on prompt: You are analyzing a Python script 'domain_identifi (mock response)
164
+
165
+ ### src/abstract_webtools/managers/allss\.py
166
+
167
+ Description of script based on prompt: You are analyzing a Python script 'allss\.py' loca (mock response)
168
+
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
4
4
  long_description = fh.read()
5
5
  setuptools.setup(
6
6
  name='abstract_webtools',
7
- version='0.1.6.96',
7
+ version='0.1.6.98',
8
8
  author='putkoff',
9
9
  author_email='partners@abstractendeavors.com',
10
10
  description='Abstract Web Tools is a Python package that provides various utility functions for web scraping tasks. It is built on top of popular libraries such as `requests`, `BeautifulSoup`, and `urllib3` to simplify the process of fetching and parsing web content.',
@@ -0,0 +1,129 @@
1
+ import os
2
+ import re
3
+ import time
4
+ import requests
5
+ from bs4 import BeautifulSoup
6
+ from urllib.parse import urljoin
7
+ from selenium import webdriver
8
+ from selenium.webdriver.common.by import By
9
+ from selenium.webdriver.common.keys import Keys
10
+ from selenium.webdriver.support.ui import WebDriverWait
11
+ from selenium.webdriver.support import expected_conditions as EC
12
+ from abstract_security import *
13
+ from abstract_webtools import *
14
+ DOWNLOAD_DIR = os.path.abspath("./downloads")
15
+ os.makedirs(DOWNLOAD_DIR, exist_ok=True)
16
+ class K2SDownloader:
17
+ def __init__(self,env_path=None):
18
+ self.env_path = env_path
19
+ self.session = requests.Session()
20
+ self.session.headers.update({
21
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
22
+ })
23
+ self.driver = self._init_driver()
24
+ self.logged_in = False
25
+
26
+ def _init_driver(self):
27
+ options = webdriver.ChromeOptions()
28
+ options.add_argument("--disable-blink-features=AutomationControlled")
29
+ options.add_argument("--headless")
30
+ return webdriver.Chrome(options=options)
31
+
32
+ def login(self):
33
+ userName = get_env_value('userName',path=self.env_path)
34
+ passWord = get_env_value('passWord',path=self.env_path)
35
+
36
+ self.driver.get("https://k2s.cc/auth/login")
37
+ time.sleep(3)
38
+
39
+
40
+ email_input = self.driver.find_element(By.NAME, "email")
41
+ password_input = self.driver.find_element(By.NAME, "input-password-auto-complete-on")
42
+ email_input.send_keys(userName)
43
+ password_input.send_keys(passWord)
44
+ password_input.send_keys(Keys.RETURN)
45
+
46
+ #WebDriverWait(self.driver, 20).until(
47
+ # EC.presence_of_element_located((By.XPATH, "//a[contains(text(), 'Logout')]"))
48
+ #)
49
+ self.logged_in = True
50
+ print("Login successful")
51
+ #except Exception as e:
52
+ # print(f"Login failed: {e}")
53
+ # with open('login_error.html', 'w', encoding='utf-8') as f:
54
+ # f.write(self.driver.page_source)
55
+
56
+ def download_file(self, url):
57
+ if not self.logged_in:
58
+ self.login()
59
+
60
+ print(f"Navigating to: {url}")
61
+ self.driver.get(url)
62
+ time.sleep(5)
63
+
64
+ if 'captcha' in self.driver.page_source.lower():
65
+ print("CAPTCHA detected. Manual intervention required.")
66
+ return
67
+
68
+ try:
69
+ download_button = WebDriverWait(self.driver, 30).until(
70
+ EC.element_to_be_clickable((By.CSS_SELECTOR, 'a[href*="/download"], button[class*="download"]'))
71
+ )
72
+ print("Download button found; attempting to click or fetch URL")
73
+ download_url = download_button.get_attribute('href')
74
+
75
+ if download_url:
76
+ response = self.session.get(download_url, stream=True)
77
+ file_name = self._extract_filename(response, download_url)
78
+ file_path = os.path.join(DOWNLOAD_DIR, file_name)
79
+
80
+ with open(file_path, 'wb') as f:
81
+ for chunk in response.iter_content(chunk_size=8192):
82
+ f.write(chunk)
83
+ print(f"Downloaded: {file_path}")
84
+ return file_path
85
+ else:
86
+ download_button.click()
87
+ print("Button clicked. Waiting for download...")
88
+ time.sleep(30) # adjust as needed
89
+ except Exception as e:
90
+ print(f"Download failed for {url}: {e}")
91
+
92
+ def _extract_filename(self, response, url):
93
+ cd = response.headers.get('Content-Disposition', '')
94
+ if 'filename=' in cd:
95
+ return cd.split('filename=')[-1].strip('"')
96
+ return url.split('/')[-1].split('?')[0]
97
+
98
+ class dlsManager:
99
+ def __init__(self, downloader):
100
+ self.downloader = downloader
101
+ self.all_dls = []
102
+
103
+ def is_prev_dl(self, data):
104
+ k2s_link = data.get('k2s')
105
+ for prev_data in self.all_dls:
106
+ if prev_data.get('k2s') == k2s_link:
107
+ return True
108
+ self.all_dls.append(data)
109
+ return False
110
+
111
+ def dl_k2s_link(self, k2s_link):
112
+ if k2s_link:
113
+ print(f"Downloading: {k2s_link}")
114
+ self.downloader.download_file(k2s_link)
115
+ time.sleep(10)
116
+
117
+
118
+ def get_soup(url):
119
+ try:
120
+ resp = requests.get(url)
121
+ resp.raise_for_status()
122
+ return BeautifulSoup(resp.text, 'html.parser')
123
+ except Exception as e:
124
+ print(f"Failed to fetch soup for {url}: {e}")
125
+ return None
126
+
127
+ def get_k2s_link(soup):
128
+ match = re.search(r'https://k2s\.cc/file/[^"<]+', str(soup))
129
+ return match.group(0) if match else None