abstract-webtools 0.1.6.112__py3-none-any.whl → 0.1.6.114__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.
@@ -13,10 +13,11 @@ from abstract_security import *
13
13
  from abstract_webtools import *
14
14
  from abstract_utilities import safe_dump_to_file,safe_read_from_json
15
15
  DOWNLOAD_DIR = os.path.abspath("./downloads")
16
- os.makedirs(DOWNLOAD_DIR, exist_ok=True)
16
+
17
17
  class K2SDownloader:
18
18
  def __init__(self,env_path=None,download_dir=None,json_file_path=None):
19
- self.download_dir = DOWNLOAD_DIR
19
+ self.download_dir = download_dir or DOWNLOAD_DIR
20
+ os.makedirs(self.download_dir, exist_ok=True)
20
21
  self.json_file_path = json_file_path
21
22
 
22
23
  self.env_path = env_path
@@ -80,11 +81,11 @@ class K2SDownloader:
80
81
  response = self.session.get(download_url, stream=True)
81
82
  file_name = self._extract_filename(response, download_url)
82
83
  file_path = os.path.join(self.download_dir, file_name)
83
-
84
- with open(file_path, 'wb') as f:
85
- for chunk in response.iter_content(chunk_size=8192):
86
- f.write(chunk)
87
- print(f"Downloaded: {file_path}")
84
+ if not os.path.isfile(file_path):
85
+ with open(file_path, 'wb') as f:
86
+ for chunk in response.iter_content(chunk_size=8192):
87
+ f.write(chunk)
88
+ print(f"Downloaded: {file_path}")
88
89
  return file_path
89
90
  else:
90
91
  download_button.click()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_webtools
3
- Version: 0.1.6.112
3
+ Version: 0.1.6.114
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=w_1MyVDMhzP_izQ5KQUi-nDsMTKbEYvPS6h476I4dL8,6252
9
+ abstract_webtools/k2s_downloader.py,sha256=viIph191079tzvcNSyaU6urMTOraM_hKAJr-IFqGoSA,6347
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.112.dist-info/METADATA,sha256=eYfxdKp0obh763LZ6CPLHnPIlcJiDQe0eaw_BqAJUxo,7289
46
- abstract_webtools-0.1.6.112.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
47
- abstract_webtools-0.1.6.112.dist-info/top_level.txt,sha256=2DMJ7RmjTcjCsa-uwAV0K6eXXlIIkFDEjBLg_uyCmCI,18
48
- abstract_webtools-0.1.6.112.dist-info/RECORD,,
45
+ abstract_webtools-0.1.6.114.dist-info/METADATA,sha256=AAnYixHMOZzzvNgKnS3PMThbx-ifcswcYAZl9qyAlho,7289
46
+ abstract_webtools-0.1.6.114.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
47
+ abstract_webtools-0.1.6.114.dist-info/top_level.txt,sha256=2DMJ7RmjTcjCsa-uwAV0K6eXXlIIkFDEjBLg_uyCmCI,18
48
+ abstract_webtools-0.1.6.114.dist-info/RECORD,,