abstract-webtools 0.1.5.91__tar.gz → 0.1.5.93__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 (34) hide show
  1. {abstract_webtools-0.1.5.91/src/abstract_webtools.egg-info → abstract_webtools-0.1.5.93}/PKG-INFO +1 -1
  2. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/setup.py +1 -1
  3. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/domainManager.py +49 -1
  4. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/seleniumManager.py +4 -1
  5. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93/src/abstract_webtools.egg-info}/PKG-INFO +1 -1
  6. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/LICENSE +0 -0
  7. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/README.md +0 -0
  8. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/pyproject.toml +0 -0
  9. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/setup.cfg +0 -0
  10. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/__init__.py +0 -0
  11. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/abstract_webtools.py +0 -0
  12. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/big_user_agent_list.py +0 -0
  13. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/main.py +0 -0
  14. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/__init__.py +0 -0
  15. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/cipherManager.py +0 -0
  16. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/crawlManager.py +0 -0
  17. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/dynamicRateLimiter.py +0 -0
  18. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/linkManager.py +0 -0
  19. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/mySocketClient.py +0 -0
  20. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/networkManager.py +0 -0
  21. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/requestManager.py +0 -0
  22. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/soupManager.py +0 -0
  23. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/sslManager.py +0 -0
  24. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/tlsAdapter.py +0 -0
  25. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/urlManager.py +0 -0
  26. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/userAgentManager.py +0 -0
  27. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/managers/videoDownloader.py +0 -0
  28. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/soup_gui.py +0 -0
  29. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/url_grabber.py +0 -0
  30. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools/url_grabber_new.py +0 -0
  31. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools.egg-info/SOURCES.txt +0 -0
  32. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools.egg-info/dependency_links.txt +0 -0
  33. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools.egg-info/requires.txt +0 -0
  34. {abstract_webtools-0.1.5.91 → abstract_webtools-0.1.5.93}/src/abstract_webtools.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_webtools
3
- Version: 0.1.5.91
3
+ Version: 0.1.5.93
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
@@ -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.5.91',
7
+ version='0.1.5.93',
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.',
@@ -1,4 +1,37 @@
1
- from ..abstract_webtools import *
1
+ from abstract_webtools import *
2
+ import os
3
+ from abstract_webtools import *
4
+ #from .urlManager import *
5
+ from urllib.parse import urlparse
6
+ from abstract_utilities import *
7
+ from selenium import webdriver
8
+ from selenium.webdriver.chrome.options import Options
9
+ import logging
10
+ import urllib3
11
+
12
+ # Suppress urllib3 warnings and debug logs
13
+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
14
+ logging.getLogger("urllib3").setLevel(logging.WARNING)
15
+
16
+ # Suppress Selenium logs
17
+ logging.getLogger("selenium").setLevel(logging.WARNING)
18
+
19
+ import os
20
+ from selenium import webdriver
21
+ from selenium.webdriver.chrome.options import Options
22
+
23
+ # Setup Chrome options
24
+ chrome_options = Options()
25
+ chrome_options.binary_location = "/home/profiles/solcatcher/.cache/selenium/chrome/linux64/130.0.6723.58/chrome"
26
+ chrome_options.add_argument("--headless") # Run in headless mode
27
+ chrome_options.add_argument("--no-sandbox")
28
+ chrome_options.add_argument("--disable-dev-shm-usage")
29
+ chrome_options.add_argument("--disable-gpu")
30
+ chrome_options.add_argument("--disable-software-rasterizer")
31
+ chrome_options.add_argument("--disable-extensions")
32
+ chrome_options.add_argument("--remote-debugging-port=9222")
33
+
34
+
2
35
  class domainManager(metaclass=SingletonMeta):
3
36
  def __init__(self, url):
4
37
  if not hasattr(self, 'initialized'): # Prevent reinitialization
@@ -50,3 +83,18 @@ class domainManager(metaclass=SingletonMeta):
50
83
  self.drivers[url] = driver
51
84
  driver.get(url)
52
85
  return self.drivers[url]
86
+ def get_selenium_source(url):
87
+ url_mgr = urlManager(url)
88
+ if url_mgr.url:
89
+ url = str(url_mgr.url)
90
+ manager = domainManager(url)
91
+ driver = manager.get_driver(url)
92
+ try:
93
+ # Get page source
94
+ page_source = driver.page_source
95
+ return page_source
96
+ finally:
97
+ # Don't quit the driver unless you're done with all interactions
98
+ pass
99
+ driver = get_selenium_source('http://solpump.io/')
100
+ input(driver)
@@ -39,7 +39,7 @@ class SingletonMeta(type):
39
39
  cls._instances[cls] = instance
40
40
  return cls._instances[cls]
41
41
 
42
- class domainManager(metaclass=SingletonMeta):
42
+ class seleniumManager(metaclass=SingletonMeta):
43
43
  def __init__(self, url):
44
44
  if not hasattr(self, 'initialized'): # Prevent reinitialization
45
45
  self.initialized = True
@@ -77,6 +77,8 @@ class domainManager(metaclass=SingletonMeta):
77
77
 
78
78
  def get_driver(self, url):
79
79
  if url and url not in self.drivers:
80
+ chrome_options = Options()
81
+ chrome_options.add_argument("--headless")
80
82
  driver = webdriver.Chrome(options=chrome_options)
81
83
  self.drivers[url] = driver
82
84
  driver.get(url)
@@ -96,3 +98,4 @@ def get_selenium_source(url):
96
98
  finally:
97
99
  # Don't quit the driver unless you're done with all interactions
98
100
  pass
101
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_webtools
3
- Version: 0.1.5.91
3
+ Version: 0.1.5.93
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