abstract-webtools 0.1.6.113__py3-none-any.whl → 0.1.6.115__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.
@@ -58,10 +58,10 @@ class K2SDownloader:
58
58
  # with open('login_error.html', 'w', encoding='utf-8') as f:
59
59
  # f.write(self.driver.page_source)
60
60
 
61
- def download_file(self, url):
61
+ def download_file(self, url,download_dir=None):
62
62
  if not self.logged_in:
63
63
  self.login()
64
-
64
+ download_dir = download_dir or self.download_dir
65
65
  print(f"Navigating to: {url}")
66
66
  self.driver.get(url)
67
67
  time.sleep(5)
@@ -80,8 +80,8 @@ class K2SDownloader:
80
80
  if download_url:
81
81
  response = self.session.get(download_url, stream=True)
82
82
  file_name = self._extract_filename(response, download_url)
83
- file_path = os.path.join(self.download_dir, file_name)
84
- if not os.path.isfile(file_path)
83
+ file_path = os.path.join(download_dir, file_name)
84
+ if not os.path.isfile(file_path):
85
85
  with open(file_path, 'wb') as f:
86
86
  for chunk in response.iter_content(chunk_size=8192):
87
87
  f.write(chunk)
@@ -119,6 +119,7 @@ class dlsManager:
119
119
  def __init__(self, downloader):
120
120
  self.downloader = downloader
121
121
  self.json_file_path = self.downloader.json_file_path
122
+ self.download_dir = self.downloader.download_dir
122
123
  all_dls= None
123
124
  if self.json_file_path:
124
125
  all_dls = safe_read_from_json(self.json_file_path)
@@ -134,7 +135,7 @@ class dlsManager:
134
135
  def dl_k2s_link(self, k2s_link):
135
136
  if k2s_link:
136
137
  print(f"Downloading: {k2s_link}")
137
- self.downloader.download_file(k2s_link)
138
+ self.downloader.download_file(k2s_link,self.download_dir)
138
139
  time.sleep(10)
139
140
  if self.json_file_path:
140
141
  self.all_dls.append(self.last_data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_webtools
3
- Version: 0.1.6.113
3
+ Version: 0.1.6.115
4
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
5
  Home-page: https://github.com/AbstractEndeavors/abstract_essentials/tree/main/abstract_webtools
6
6
  Author: putkoff
@@ -6,7 +6,7 @@ abstract_webtools/big_user_agent_list.py,sha256=5ZkrUWmfzYL5yaULREslh9ZiRQeITbSj
6
6
  abstract_webtools/domain_identifier.py,sha256=AvWlGD7C19rySa_J_Brxi3kz43LMWvGsshuuZNg7MvI,3320
7
7
  abstract_webtools/extention_list.py,sha256=gRSO4nMbuuXDYzd-ss4s64sS80ZHmUoazMCpgoKG5vE,4884
8
8
  abstract_webtools/find_dirs.py,sha256=BlE4ruzMABqmv03NcutZ1j5N3pCc-Q4uNEAMpNolZCQ,2609
9
- abstract_webtools/k2s_downloader.py,sha256=hufkail8EL1qK24uQWeUHyImCyO2X3JWbqUGN3L5Xp4,6346
9
+ abstract_webtools/k2s_downloader.py,sha256=PP0POb1dJPySjWlBH1jX37wyols-SVuhqXYvLp3lhZo,6491
10
10
  abstract_webtools/main.py,sha256=_I7pPXPkoLZOoYGLQDrSLGhGuQt6-PVyXEHZSmglk2g,1329
11
11
  abstract_webtools/soup_gui.py,sha256=n95YAps1R6DpMwR4UbthSqQby0C5WHUa9tsW-f2qpLg,5184
12
12
  abstract_webtools/url_grabber.py,sha256=pnCCev7ZIuM-6cAGTLmK5HfzZg_AX-fLcRpB6ZE70B8,10441
@@ -42,7 +42,7 @@ abstract_webtools/managers/soupManager/soupManager.py,sha256=U3_o189-OWoBRaSCe2s
42
42
  abstract_webtools/managers/urlManager/__init__.py,sha256=gaJCHeK91Z-eYsBnxgdhbIUten1-gbx-zqx70R6ag-Y,26
43
43
  abstract_webtools/managers/urlManager/urlManager.py,sha256=vCFuLADmv3h7icaaoAsImGqb_49VizPY_ZvMl-C7PYk,7756
44
44
  abstract_webtools/managers/videos/Heather brooke swallo from condom.mp4,sha256=h-bKFLAHt7pGLGu4EcMvSSox7BPRK0Nga3u813iMVKQ,8335544
45
- abstract_webtools-0.1.6.113.dist-info/METADATA,sha256=y9H5cyyKzX_u0jP45J0H5TuYaLze4D46rTt7-KrFIFo,7289
46
- abstract_webtools-0.1.6.113.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
47
- abstract_webtools-0.1.6.113.dist-info/top_level.txt,sha256=2DMJ7RmjTcjCsa-uwAV0K6eXXlIIkFDEjBLg_uyCmCI,18
48
- abstract_webtools-0.1.6.113.dist-info/RECORD,,
45
+ abstract_webtools-0.1.6.115.dist-info/METADATA,sha256=Cj7BerF6qSNwhHiTzSbnvQrwmuNSwthspvU_7tKtXxc,7289
46
+ abstract_webtools-0.1.6.115.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
47
+ abstract_webtools-0.1.6.115.dist-info/top_level.txt,sha256=2DMJ7RmjTcjCsa-uwAV0K6eXXlIIkFDEjBLg_uyCmCI,18
48
+ abstract_webtools-0.1.6.115.dist-info/RECORD,,