abstract-webtools 0.1.6.44__py3-none-any.whl → 0.1.6.45__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.
File without changes
@@ -1,8 +1,31 @@
1
1
  from ..abstract_webtools import *
2
+ import random
3
+ operating_systems = ['Macintosh','Windows','Linux']
4
+ browsers = ['Firefox','Chrome','IceDragon','Waterfox','Gecko','Safari','MetaSr']
5
+ def get_browser(browser=None):
6
+ if not browser:
7
+ return browsers[0]
8
+ if browser in browsers:
9
+ return browser
10
+ browser_lower = browser.lower()
11
+ for string_browser in browsers:
12
+ string_browser_lower = string_browser.lower()
13
+ if string_browser in string_browser_lower:
14
+ return string_browser
15
+ return browsers[0]
16
+ def get_os(os=None):
17
+ os_lower = os.lower()
18
+ if not os:
19
+ return operating_systems[0]
20
+ for string_os in operating_systems:
21
+ string_os_lower = string_os.lower()
22
+ if string_os in string_os_lower:
23
+ return string_os
24
+ return operating_systems[0]
2
25
  class UserAgentManager:
3
26
  def __init__(self, os=None, browser=None, version=None,user_agent=None):
4
- self.os = os or 'Windows'
5
- self.browser = browser or "Firefox"
27
+ self.os = os or get_os(os=os)
28
+ self.browser = browser or get_browser(browser=browser)
6
29
  self.version = version or '42.0'
7
30
  self.user_agent = user_agent or self.get_user_agent()
8
31
  self.header = self.user_agent_header()
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: abstract_webtools
3
- Version: 0.1.6.44
3
+ Version: 0.1.6.45
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
@@ -12,7 +12,6 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Requires-Python: >=3.6
14
14
  Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
15
  Requires-Dist: abstract_utilities>=0.2.2.30
17
16
  Requires-Dist: PySimpleGUI>=4.60.5
18
17
  Requires-Dist: urllib3>=2.0.4
@@ -22,7 +22,7 @@ abstract_webtools/managers/soupManager.py,sha256=-_mRCWlyzfKlF64UU53WXBmCvJ98jQ4
22
22
  abstract_webtools/managers/sslManager.py,sha256=C-QgQw9CW84uOE5kx2MPjC3RsLbE2JQqdwdTs0H4ecc,1370
23
23
  abstract_webtools/managers/tlsAdapter.py,sha256=XZSMZz9EUOhv-h3_Waf6mjV1dA3oN_M_oWuoo4VZ_HE,1454
24
24
  abstract_webtools/managers/urlManager.py,sha256=Dvf-TiSo5j_YjZS2Eq6lFfbhveneD6NA_wEE0xUXy_E,8858
25
- abstract_webtools/managers/userAgentManager.py,sha256=33SB2p2FG7EYZl7l2iYm1U4gI9PcdkGTZHw5lg_Ogrw,1653
25
+ abstract_webtools/managers/userAgentManager.py,sha256=fUal9FzWquY2gGQ-tR_SraxddfUO1bgiFqxQ3ixOQQI,2470
26
26
  abstract_webtools/managers/videoDownloader.py,sha256=eFk0yF6Eq9sywhNlnEC1HrnFe5zlcBXXS2UqWQN_2aE,10436
27
27
  abstract_webtools/managers/videoDownloader2.py,sha256=v3H6akdhvVWGrB-r35m3cp_-aKkNWadpfCiMylOnv6w,12748
28
28
  abstract_webtools/managers/linkManager/__init__.py,sha256=NpfWNzvTLSfsIWSeLYIxPzeLHADk_grSx5rfgCeWERw,27
@@ -35,8 +35,7 @@ abstract_webtools/managers/soupManager/soupManager.py,sha256=U3_o189-OWoBRaSCe2s
35
35
  abstract_webtools/managers/urlManager/__init__.py,sha256=gaJCHeK91Z-eYsBnxgdhbIUten1-gbx-zqx70R6ag-Y,26
36
36
  abstract_webtools/managers/urlManager/urlManager.py,sha256=vCFuLADmv3h7icaaoAsImGqb_49VizPY_ZvMl-C7PYk,7756
37
37
  abstract_webtools/managers/videos/Heather brooke swallo from condom.mp4,sha256=h-bKFLAHt7pGLGu4EcMvSSox7BPRK0Nga3u813iMVKQ,8335544
38
- abstract_webtools-0.1.6.44.dist-info/LICENSE,sha256=g3WEJFiVS27HyCGRTwKSsMLyciMaGFdWcZGOe1QalZk,3877
39
- abstract_webtools-0.1.6.44.dist-info/METADATA,sha256=RTPUlst4dfTheq2w7JQCNvZYvMJBO5Iy6ZwjgvB8J2E,16051
40
- abstract_webtools-0.1.6.44.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
41
- abstract_webtools-0.1.6.44.dist-info/top_level.txt,sha256=2DMJ7RmjTcjCsa-uwAV0K6eXXlIIkFDEjBLg_uyCmCI,18
42
- abstract_webtools-0.1.6.44.dist-info/RECORD,,
38
+ abstract_webtools-0.1.6.45.dist-info/METADATA,sha256=bFbde2cqUfIPytOHzBZOAMa6oLnbAxs0TYF5VnfAjiA,16029
39
+ abstract_webtools-0.1.6.45.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
40
+ abstract_webtools-0.1.6.45.dist-info/top_level.txt,sha256=2DMJ7RmjTcjCsa-uwAV0K6eXXlIIkFDEjBLg_uyCmCI,18
41
+ abstract_webtools-0.1.6.45.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,46 +0,0 @@
1
- This project is licensed under the MIT License
2
-
3
- MIT License
4
-
5
- The MIT License was first developed at the Massachusetts Institute of Technology (MIT) in the late 1980s. The exact origins MIT license are bit of mystery. Like the Apache 2.0, and BSD family of licenses the MIT License is a permissive software license that places few restrictions of reuse. Users of software using an MIT License are permitted to use, copy, modify, merge publish, distribute, sublicense and sell copies of the software. Some notable projects use the MIT License including Ruby on Rails, and the X Windows System.
6
- MIT License Conditions
7
- The MIT License is relatively simple and short. Below is the text of the MIT License from the Open Software Initiative.
8
- Begin license text.
9
-
10
- Copyright <YEAR> <COPYRIGHT HOLDER>
11
-
12
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
- End license text.
18
- Using MIT Licensed Code
19
-
20
-
21
-
22
- The basic conditions of using the MIT License are:
23
-
24
- 1. The original copyright notice
25
-
26
- 2. A copy of the license itself
27
-
28
- are including in all copies or any substantial portions of the software.
29
- MIT License Compatibility
30
-
31
- The MIT License is highly compatible with other permissive licenses. Including the BSD family of licenses. It is generally compatible with GNU GPL group of licenses. However if you distribute the code that contains or is derivative of GNU GPL code the final project must of GPL compliant. In other words any source code must of publicly available.
32
- MIT License, Patents
33
-
34
- The MIT License was developed before patenting software was a common practice in the U.S. It therefore does not contain an express patent license. The broad nature of the license in general, is considered by some to encompass an implicit waiver of patent rights. If you are concerned about patent rights, the Apache 2.0 license contains an explicit contributor's patent license.
35
- MIT No Attribution License (MIT-0)
36
-
37
- The MIT No Attribution License is a Public Domain equivalent license it is similar to the BSD Free license.
38
-
39
-
40
-
41
- Copyright <YEAR><COPYRIGHT HOLDER>
42
-
43
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.
44
-
45
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46
-