stealthhttp 0.3.0__cp38-abi3-win_amd64.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.
- stealthhttp/__init__.py +443 -0
- stealthhttp/_core.pyd +0 -0
- stealthhttp/_fallback.py +490 -0
- stealthhttp/_loader.py +35 -0
- stealthhttp/_rotation.py +65 -0
- stealthhttp/ambient.py +429 -0
- stealthhttp/antidetect.py +130 -0
- stealthhttp/async_session.py +195 -0
- stealthhttp/auto_bypass.py +147 -0
- stealthhttp/auto_profile.py +257 -0
- stealthhttp/backends/__init__.py +64 -0
- stealthhttp/backends/base.py +107 -0
- stealthhttp/backends/curl_backend.py +215 -0
- stealthhttp/backends/native_backend.py +235 -0
- stealthhttp/backends/wreq_backend.py +304 -0
- stealthhttp/behavior.py +392 -0
- stealthhttp/browser_cookies.py +386 -0
- stealthhttp/browser_pool.py +150 -0
- stealthhttp/browsing.py +213 -0
- stealthhttp/bypasses/__init__.py +366 -0
- stealthhttp/bypasses/akamai.py +213 -0
- stealthhttp/bypasses/captcha.py +472 -0
- stealthhttp/bypasses/cloudflare.py +201 -0
- stealthhttp/bypasses/datadome.py +166 -0
- stealthhttp/bypasses/flow.py +316 -0
- stealthhttp/bypasses/imperva.py +192 -0
- stealthhttp/bypasses/kasada.py +176 -0
- stealthhttp/bypasses/perimeterx.py +195 -0
- stealthhttp/bypasses/shape.py +142 -0
- stealthhttp/bypasses/solver.py +257 -0
- stealthhttp/capabilities.py +344 -0
- stealthhttp/captcha.py +329 -0
- stealthhttp/captcha_farm.py +178 -0
- stealthhttp/cdp_solver.py +499 -0
- stealthhttp/challenge.py +215 -0
- stealthhttp/clienthints.py +204 -0
- stealthhttp/collectors/__init__.py +29 -0
- stealthhttp/collectors/akamai.py +211 -0
- stealthhttp/collectors/datadome.py +151 -0
- stealthhttp/collectors/imperva.py +153 -0
- stealthhttp/collectors/kasada.py +139 -0
- stealthhttp/collectors/perimeterx.py +156 -0
- stealthhttp/collectors/shape.py +133 -0
- stealthhttp/consistency.py +413 -0
- stealthhttp/cookies.py +269 -0
- stealthhttp/detection.py +499 -0
- stealthhttp/device_db.py +270 -0
- stealthhttp/dns_intel.py +305 -0
- stealthhttp/doh.py +228 -0
- stealthhttp/error_analysis.py +295 -0
- stealthhttp/exceptions.py +64 -0
- stealthhttp/fingerprint_diff.py +126 -0
- stealthhttp/forms.py +265 -0
- stealthhttp/geo.py +214 -0
- stealthhttp/graphql.py +172 -0
- stealthhttp/h2_frames.py +258 -0
- stealthhttp/har.py +147 -0
- stealthhttp/header_canon.py +271 -0
- stealthhttp/health_monitor.py +424 -0
- stealthhttp/hooks.py +121 -0
- stealthhttp/hsts.py +161 -0
- stealthhttp/httpcache.py +159 -0
- stealthhttp/humanize.py +247 -0
- stealthhttp/identity.py +315 -0
- stealthhttp/js_sandbox.py +494 -0
- stealthhttp/jsdb.py +268 -0
- stealthhttp/jsenv.py +391 -0
- stealthhttp/lifecycle.py +225 -0
- stealthhttp/lint.py +138 -0
- stealthhttp/middleware.py +396 -0
- stealthhttp/multipart.py +136 -0
- stealthhttp/parsing.py +239 -0
- stealthhttp/pow.py +175 -0
- stealthhttp/prepare.py +146 -0
- stealthhttp/proxy.py +358 -0
- stealthhttp/proxy_scoring.py +357 -0
- stealthhttp/record_replay.py +297 -0
- stealthhttp/redirect_intel.py +314 -0
- stealthhttp/request_graph.py +498 -0
- stealthhttp/response.py +188 -0
- stealthhttp/response_decoder.py +234 -0
- stealthhttp/response_intel.py +396 -0
- stealthhttp/retry.py +156 -0
- stealthhttp/rotation.py +254 -0
- stealthhttp/selfcheck.py +200 -0
- stealthhttp/sensors.py +459 -0
- stealthhttp/session.py +487 -0
- stealthhttp/session_coord.py +374 -0
- stealthhttp/session_ext.py +376 -0
- stealthhttp/site_recipes.py +341 -0
- stealthhttp/smart_proxy.py +233 -0
- stealthhttp/solving/__init__.py +149 -0
- stealthhttp/solving/audio.py +339 -0
- stealthhttp/solving/base.py +209 -0
- stealthhttp/solving/browser.py +198 -0
- stealthhttp/solving/local.py +423 -0
- stealthhttp/solving/orchestrator.py +216 -0
- stealthhttp/solving/providers.py +270 -0
- stealthhttp/solving/vision.py +314 -0
- stealthhttp/stealth_audit.py +472 -0
- stealthhttp/strategy.py +495 -0
- stealthhttp/tcp_tuning.py +271 -0
- stealthhttp/tests/test_cdp_solver.py +419 -0
- stealthhttp/tests/test_features_v3.py +497 -0
- stealthhttp/tests/test_features_v3_live.py +202 -0
- stealthhttp/tests/test_v030_features.py +510 -0
- stealthhttp/tls_ext.py +168 -0
- stealthhttp/tls_intel.py +431 -0
- stealthhttp/tls_session.py +387 -0
- stealthhttp/traffic.py +389 -0
- stealthhttp/websocket.py +353 -0
- stealthhttp-0.3.0.dist-info/METADATA +531 -0
- stealthhttp-0.3.0.dist-info/RECORD +116 -0
- stealthhttp-0.3.0.dist-info/WHEEL +4 -0
- stealthhttp-0.3.0.dist-info/licenses/LICENSE +21 -0
- stealthhttp-0.3.0.dist-info/sboms/stealthhttp-core.cyclonedx.json +4173 -0
stealthhttp/__init__.py
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
"""stealthhttp — HTTP with TLS fingerprint impersonation.
|
|
2
|
+
|
|
3
|
+
from stealthhttp import Session
|
|
4
|
+
|
|
5
|
+
s = Session(browser="chrome136", proxy="http://user:pass@ip:port")
|
|
6
|
+
r = s.get("https://example.com", timeout=15)
|
|
7
|
+
print(r.status_code, r.text)
|
|
8
|
+
|
|
9
|
+
print(s.ja3_hash, s.ja4)
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
from . import bypasses, collectors, multipart
|
|
17
|
+
from ._loader import NATIVE, Profile, Rotator, build_profile, resolve_profile
|
|
18
|
+
from .antidetect import Jitter
|
|
19
|
+
from .backends import available_backends, get_backend
|
|
20
|
+
from .browsing import KINDS, RefererChain, fetch_site
|
|
21
|
+
from .bypasses import BypassEngine, BypassResult
|
|
22
|
+
from .capabilities import CAPABILITIES, Cap, CapabilityUnsupported, Router
|
|
23
|
+
from .captcha import Challenge, Solvability, Solver, Vendor, identify
|
|
24
|
+
from .clienthints import HintStore
|
|
25
|
+
from .collectors import (
|
|
26
|
+
AkamaiSensor,
|
|
27
|
+
DataDomeCollector,
|
|
28
|
+
ImpervaCollector,
|
|
29
|
+
PerimeterXCollector,
|
|
30
|
+
)
|
|
31
|
+
from .identity import Identity, IdentityStore
|
|
32
|
+
from .behavior import PageVisit, VisitPlan, plan_visit
|
|
33
|
+
from .challenge import CLEARANCE_COOKIES, ChallengeTracker, find_interstitial
|
|
34
|
+
from .cookies import Cookie, CookieJar
|
|
35
|
+
from .detection import VECTORS, Layer, Status, audit, lint
|
|
36
|
+
from .geo import COUNTRY_LANGUAGES, ProxyGeo, language_for
|
|
37
|
+
from .hsts import HstsStore
|
|
38
|
+
from .httpcache import ResponseCache
|
|
39
|
+
from .humanize import (
|
|
40
|
+
DEFAULT_MAX_KMH,
|
|
41
|
+
ActivityClock,
|
|
42
|
+
FlowStep,
|
|
43
|
+
TravelCheck,
|
|
44
|
+
check_travel,
|
|
45
|
+
dwell_times,
|
|
46
|
+
)
|
|
47
|
+
from .jsenv import JsEnvironment
|
|
48
|
+
from .exceptions import (
|
|
49
|
+
Banned,
|
|
50
|
+
CircuitOpen,
|
|
51
|
+
ConnectionError,
|
|
52
|
+
HTTPStatusError,
|
|
53
|
+
NoHealthyProxies,
|
|
54
|
+
ProxyError,
|
|
55
|
+
RequestsError,
|
|
56
|
+
StealthHTTPError,
|
|
57
|
+
Timeout,
|
|
58
|
+
TooManyRedirects,
|
|
59
|
+
UnknownProfile,
|
|
60
|
+
)
|
|
61
|
+
from .hooks import HookRegistry, PreparedRequest, log_hook
|
|
62
|
+
from .pow import PowSolution, solve_sha256
|
|
63
|
+
from .proxy import ProxyPool, detect_ban
|
|
64
|
+
from .response import Response
|
|
65
|
+
from .retry import CircuitBreaker, RetryPolicy
|
|
66
|
+
from .selfcheck import measure, predict, verify
|
|
67
|
+
from .sensors import (
|
|
68
|
+
InteractionSequence,
|
|
69
|
+
KeyboardTrack,
|
|
70
|
+
MouseEvent,
|
|
71
|
+
MouseTrack,
|
|
72
|
+
ScrollTrack,
|
|
73
|
+
TouchTrack,
|
|
74
|
+
)
|
|
75
|
+
from .session import Session
|
|
76
|
+
from .async_session import AsyncSession
|
|
77
|
+
from .doh import DoHResolver
|
|
78
|
+
from .har import export_har, save_har, load_har, replay_har
|
|
79
|
+
from .parsing import HTMLDocument, Element
|
|
80
|
+
from .websocket import WebSocket
|
|
81
|
+
from .proxy import parse_chain, connect_chain
|
|
82
|
+
from .tcp_tuning import TCPProfile, ConnectionPoolPolicy, apply_tcp_profile, dns_prefetch_domains
|
|
83
|
+
from .tls_session import SessionTicket, SessionTicketCache, RecordSplitPattern, TLSCaptureProxy
|
|
84
|
+
from .tls_ext import ECHConfig, ALPSConfig, CertCompression, shuffle_extensions, get_pq_curve
|
|
85
|
+
from .h2_frames import PriorityTree, FlowControlProfile, ConditionalHeaders, accept_for_type
|
|
86
|
+
from .consistency import EntropyScorer, NavigatorCoherence, validate_cross_layer
|
|
87
|
+
from .device_db import DeviceSpec, pick_device
|
|
88
|
+
from .ambient import AmbientLoader, DecoyTraffic, TimingCoherence, WarmupPipeline
|
|
89
|
+
from .lifecycle import PageLifecycle, ScrollDepthModel, HumanIdleModel
|
|
90
|
+
from .browser_cookies import import_chrome, import_firefox, find_browser_profiles
|
|
91
|
+
from .rotation import AgeRotator, GradientRotator, SessionRecorder
|
|
92
|
+
from .middleware import Middleware, MiddlewarePipeline, RateLimitMiddleware
|
|
93
|
+
from .strategy import AdaptiveStrategy, WAFDetector, HoneypotDetector, RateLimitPredictor, StealthDiagnostic
|
|
94
|
+
from .js_sandbox import JSSandbox, Deobfuscator, match_challenge, CHALLENGE_TEMPLATES
|
|
95
|
+
from .middleware import ConcurrencyLimiter, DomainThrottle, CorsPreflight, CacheRevalidator
|
|
96
|
+
from .stealth_audit import StealthScore, ProfileDiff, quick_audit
|
|
97
|
+
from .auto_profile import AutoProfileSelector, ProfileRotationPolicy
|
|
98
|
+
from .header_canon import HeaderCanonicalizer, PseudoHeaderOrder
|
|
99
|
+
from .tls_intel import CertAnalyzer, ServerFingerprint, MitmDetector
|
|
100
|
+
from .response_intel import BodyIntelligence, CookieClassifier, PatternDetector
|
|
101
|
+
from .traffic import NetworkSimulator, TrafficShaper, BandwidthMonitor, NETWORK_PROFILES
|
|
102
|
+
from .dns_intel import DnsLeakChecker, CnameTracker, CdnDetector, DnsPrefetchPlanner
|
|
103
|
+
from .proxy_scoring import ProxyScorer, ProxyBenchmark
|
|
104
|
+
from .redirect_intel import RedirectTracker, ChallengeRedirectDetector, RedirectPattern
|
|
105
|
+
from .error_analysis import ErrorClassifier, ErrorPattern, FixSuggester
|
|
106
|
+
from .session_coord import SharedRateLimiter, IdentityRotationPolicy, SessionPool, CoordinationHub
|
|
107
|
+
from .health_monitor import HealthMonitor, AlertManager, HealthStatus, SessionHealth
|
|
108
|
+
from .request_graph import RequestGraph, ResourceNode, build_graph_from_html, estimate_load_time
|
|
109
|
+
from .response_decoder import ContentDecoder, CharsetDetector, EncodingNegotiator, decode_response
|
|
110
|
+
from .fingerprint_diff import FingerprintDiff, format_diff, similarity_score
|
|
111
|
+
from .cdp_solver import StealthBrowser, CdpSession, find_chrome, solve_challenge as cdp_solve
|
|
112
|
+
from .auto_bypass import AutoSession
|
|
113
|
+
from .site_recipes import SiteRecipe, get_recipe, apply_recipe, RECIPES
|
|
114
|
+
from .forms import Form, FormField, FormExtractor, fill_form, submit_form
|
|
115
|
+
from .graphql import GraphQLClient, GraphQLResponse, GraphQLError
|
|
116
|
+
from .smart_proxy import SmartProxyPool, ProxySiteStats
|
|
117
|
+
from .browser_pool import BrowserPool
|
|
118
|
+
from .record_replay import HttpRecorder, SessionReplayer, RecordedEntry, record_session
|
|
119
|
+
from .captcha_farm import CaptchaFarm, SolveResult
|
|
120
|
+
|
|
121
|
+
__version__ = "0.3.0"
|
|
122
|
+
|
|
123
|
+
__all__ = [
|
|
124
|
+
"Session",
|
|
125
|
+
"Response",
|
|
126
|
+
"ProxyPool",
|
|
127
|
+
"CookieJar",
|
|
128
|
+
"Cookie",
|
|
129
|
+
"RetryPolicy",
|
|
130
|
+
"CircuitBreaker",
|
|
131
|
+
"Jitter",
|
|
132
|
+
"HookRegistry",
|
|
133
|
+
"PreparedRequest",
|
|
134
|
+
"log_hook",
|
|
135
|
+
"Profile",
|
|
136
|
+
"Rotator",
|
|
137
|
+
"resolve_profile",
|
|
138
|
+
"build_profile",
|
|
139
|
+
"detect_ban",
|
|
140
|
+
"predict",
|
|
141
|
+
"measure",
|
|
142
|
+
"verify",
|
|
143
|
+
"available_backends",
|
|
144
|
+
"get_backend",
|
|
145
|
+
"NATIVE",
|
|
146
|
+
"__version__",
|
|
147
|
+
# capability routing
|
|
148
|
+
"Cap",
|
|
149
|
+
"CAPABILITIES",
|
|
150
|
+
"CapabilityUnsupported",
|
|
151
|
+
"Router",
|
|
152
|
+
# bypass layer
|
|
153
|
+
"KINDS",
|
|
154
|
+
"RefererChain",
|
|
155
|
+
"fetch_site",
|
|
156
|
+
"ChallengeTracker",
|
|
157
|
+
"CLEARANCE_COOKIES",
|
|
158
|
+
"find_interstitial",
|
|
159
|
+
"multipart",
|
|
160
|
+
# behaviour emulation
|
|
161
|
+
"PageVisit",
|
|
162
|
+
"VisitPlan",
|
|
163
|
+
"plan_visit",
|
|
164
|
+
"ResponseCache",
|
|
165
|
+
# humanization: session-level activity timing and travel plausibility
|
|
166
|
+
"ActivityClock",
|
|
167
|
+
"TravelCheck",
|
|
168
|
+
"check_travel",
|
|
169
|
+
"DEFAULT_MAX_KMH",
|
|
170
|
+
"FlowStep",
|
|
171
|
+
"dwell_times",
|
|
172
|
+
"ProxyGeo",
|
|
173
|
+
"COUNTRY_LANGUAGES",
|
|
174
|
+
"language_for",
|
|
175
|
+
# detection catalogue
|
|
176
|
+
"VECTORS",
|
|
177
|
+
"Layer",
|
|
178
|
+
"Status",
|
|
179
|
+
"audit",
|
|
180
|
+
"lint",
|
|
181
|
+
# captcha identification (detection + params; solving needs a service)
|
|
182
|
+
"Vendor",
|
|
183
|
+
"Solvability",
|
|
184
|
+
"Challenge",
|
|
185
|
+
"Solver",
|
|
186
|
+
"identify",
|
|
187
|
+
# persistent identity / browser hand-off
|
|
188
|
+
"Identity",
|
|
189
|
+
"IdentityStore",
|
|
190
|
+
# exceptions
|
|
191
|
+
"StealthHTTPError",
|
|
192
|
+
"RequestsError",
|
|
193
|
+
"ConnectionError",
|
|
194
|
+
"Timeout",
|
|
195
|
+
"ProxyError",
|
|
196
|
+
"TooManyRedirects",
|
|
197
|
+
"HTTPStatusError",
|
|
198
|
+
"NoHealthyProxies",
|
|
199
|
+
"Banned",
|
|
200
|
+
"CircuitOpen",
|
|
201
|
+
"UnknownProfile",
|
|
202
|
+
# JS emulation
|
|
203
|
+
"JsEnvironment",
|
|
204
|
+
"HintStore",
|
|
205
|
+
"HstsStore",
|
|
206
|
+
"MouseTrack",
|
|
207
|
+
"MouseEvent",
|
|
208
|
+
"KeyboardTrack",
|
|
209
|
+
"TouchTrack",
|
|
210
|
+
"ScrollTrack",
|
|
211
|
+
"InteractionSequence",
|
|
212
|
+
"AkamaiSensor",
|
|
213
|
+
"PerimeterXCollector",
|
|
214
|
+
"DataDomeCollector",
|
|
215
|
+
"ImpervaCollector",
|
|
216
|
+
"collectors",
|
|
217
|
+
# automatic bypass
|
|
218
|
+
"BypassEngine",
|
|
219
|
+
"BypassResult",
|
|
220
|
+
"bypasses",
|
|
221
|
+
# proof-of-work
|
|
222
|
+
"PowSolution",
|
|
223
|
+
"solve_sha256",
|
|
224
|
+
# module-level verbs
|
|
225
|
+
# async
|
|
226
|
+
"AsyncSession",
|
|
227
|
+
# websocket
|
|
228
|
+
"WebSocket",
|
|
229
|
+
# DNS-over-HTTPS
|
|
230
|
+
"DoHResolver",
|
|
231
|
+
# HAR
|
|
232
|
+
"export_har",
|
|
233
|
+
"save_har",
|
|
234
|
+
"load_har",
|
|
235
|
+
"replay_har",
|
|
236
|
+
# HTML parsing
|
|
237
|
+
"HTMLDocument",
|
|
238
|
+
"Element",
|
|
239
|
+
# proxy chain
|
|
240
|
+
"parse_chain",
|
|
241
|
+
"connect_chain",
|
|
242
|
+
# TCP stack mimicry
|
|
243
|
+
"TCPProfile",
|
|
244
|
+
"ConnectionPoolPolicy",
|
|
245
|
+
"apply_tcp_profile",
|
|
246
|
+
"dns_prefetch_domains",
|
|
247
|
+
# TLS session management
|
|
248
|
+
"SessionTicket",
|
|
249
|
+
"SessionTicketCache",
|
|
250
|
+
"RecordSplitPattern",
|
|
251
|
+
"TLSCaptureProxy",
|
|
252
|
+
# TLS extensions
|
|
253
|
+
"ECHConfig",
|
|
254
|
+
"ALPSConfig",
|
|
255
|
+
"CertCompression",
|
|
256
|
+
"shuffle_extensions",
|
|
257
|
+
"get_pq_curve",
|
|
258
|
+
# HTTP/2 frames
|
|
259
|
+
"PriorityTree",
|
|
260
|
+
"FlowControlProfile",
|
|
261
|
+
"ConditionalHeaders",
|
|
262
|
+
"accept_for_type",
|
|
263
|
+
# cross-layer consistency
|
|
264
|
+
"EntropyScorer",
|
|
265
|
+
"NavigatorCoherence",
|
|
266
|
+
"validate_cross_layer",
|
|
267
|
+
# device database
|
|
268
|
+
"DeviceSpec",
|
|
269
|
+
"pick_device",
|
|
270
|
+
# ambient traffic
|
|
271
|
+
"AmbientLoader",
|
|
272
|
+
"DecoyTraffic",
|
|
273
|
+
"TimingCoherence",
|
|
274
|
+
"WarmupPipeline",
|
|
275
|
+
# page lifecycle
|
|
276
|
+
"PageLifecycle",
|
|
277
|
+
"ScrollDepthModel",
|
|
278
|
+
"HumanIdleModel",
|
|
279
|
+
# browser cookie import
|
|
280
|
+
"import_chrome",
|
|
281
|
+
"import_firefox",
|
|
282
|
+
"find_browser_profiles",
|
|
283
|
+
# fingerprint rotation
|
|
284
|
+
"AgeRotator",
|
|
285
|
+
"GradientRotator",
|
|
286
|
+
"SessionRecorder",
|
|
287
|
+
# middleware pipeline
|
|
288
|
+
"Middleware",
|
|
289
|
+
"MiddlewarePipeline",
|
|
290
|
+
"RateLimitMiddleware",
|
|
291
|
+
# adaptive strategy
|
|
292
|
+
"AdaptiveStrategy",
|
|
293
|
+
"WAFDetector",
|
|
294
|
+
"HoneypotDetector",
|
|
295
|
+
"RateLimitPredictor",
|
|
296
|
+
"StealthDiagnostic",
|
|
297
|
+
# JS sandbox
|
|
298
|
+
"JSSandbox",
|
|
299
|
+
"Deobfuscator",
|
|
300
|
+
"match_challenge",
|
|
301
|
+
"CHALLENGE_TEMPLATES",
|
|
302
|
+
# concurrency middleware
|
|
303
|
+
"ConcurrencyLimiter",
|
|
304
|
+
"DomainThrottle",
|
|
305
|
+
# CORS preflight emulation
|
|
306
|
+
"CorsPreflight",
|
|
307
|
+
# cache revalidation (If-None-Match/If-Modified-Since)
|
|
308
|
+
"CacheRevalidator",
|
|
309
|
+
# stealth audit
|
|
310
|
+
"StealthScore",
|
|
311
|
+
"ProfileDiff",
|
|
312
|
+
"quick_audit",
|
|
313
|
+
# auto profile
|
|
314
|
+
"AutoProfileSelector",
|
|
315
|
+
"ProfileRotationPolicy",
|
|
316
|
+
# header canonicalization
|
|
317
|
+
"HeaderCanonicalizer",
|
|
318
|
+
"PseudoHeaderOrder",
|
|
319
|
+
# TLS intelligence
|
|
320
|
+
"CertAnalyzer",
|
|
321
|
+
"ServerFingerprint",
|
|
322
|
+
"MitmDetector",
|
|
323
|
+
# response intelligence
|
|
324
|
+
"BodyIntelligence",
|
|
325
|
+
"CookieClassifier",
|
|
326
|
+
"PatternDetector",
|
|
327
|
+
# traffic shaping
|
|
328
|
+
"NetworkSimulator",
|
|
329
|
+
"TrafficShaper",
|
|
330
|
+
"BandwidthMonitor",
|
|
331
|
+
"NETWORK_PROFILES",
|
|
332
|
+
# DNS intelligence
|
|
333
|
+
"DnsLeakChecker",
|
|
334
|
+
"CnameTracker",
|
|
335
|
+
"CdnDetector",
|
|
336
|
+
"DnsPrefetchPlanner",
|
|
337
|
+
# proxy scoring
|
|
338
|
+
"ProxyScorer",
|
|
339
|
+
"ProxyBenchmark",
|
|
340
|
+
# redirect intelligence
|
|
341
|
+
"RedirectTracker",
|
|
342
|
+
"ChallengeRedirectDetector",
|
|
343
|
+
"RedirectPattern",
|
|
344
|
+
# error analysis
|
|
345
|
+
"ErrorClassifier",
|
|
346
|
+
"ErrorPattern",
|
|
347
|
+
"FixSuggester",
|
|
348
|
+
# session coordination
|
|
349
|
+
"SharedRateLimiter",
|
|
350
|
+
"IdentityRotationPolicy",
|
|
351
|
+
"SessionPool",
|
|
352
|
+
"CoordinationHub",
|
|
353
|
+
# health monitoring
|
|
354
|
+
"HealthMonitor",
|
|
355
|
+
"AlertManager",
|
|
356
|
+
"HealthStatus",
|
|
357
|
+
"SessionHealth",
|
|
358
|
+
# request graph
|
|
359
|
+
"RequestGraph",
|
|
360
|
+
"ResourceNode",
|
|
361
|
+
"build_graph_from_html",
|
|
362
|
+
"estimate_load_time",
|
|
363
|
+
# response decoder
|
|
364
|
+
"ContentDecoder",
|
|
365
|
+
"CharsetDetector",
|
|
366
|
+
"EncodingNegotiator",
|
|
367
|
+
"decode_response",
|
|
368
|
+
# fingerprint diff
|
|
369
|
+
"FingerprintDiff",
|
|
370
|
+
"format_diff",
|
|
371
|
+
"similarity_score",
|
|
372
|
+
# CDP challenge solver
|
|
373
|
+
"StealthBrowser",
|
|
374
|
+
"CdpSession",
|
|
375
|
+
"find_chrome",
|
|
376
|
+
"cdp_solve",
|
|
377
|
+
# auto bypass
|
|
378
|
+
"AutoSession",
|
|
379
|
+
# site recipes
|
|
380
|
+
"SiteRecipe", "get_recipe", "apply_recipe", "RECIPES",
|
|
381
|
+
# form automation
|
|
382
|
+
"Form", "FormField", "FormExtractor", "fill_form", "submit_form",
|
|
383
|
+
# GraphQL
|
|
384
|
+
"GraphQLClient", "GraphQLResponse", "GraphQLError",
|
|
385
|
+
# smart proxy
|
|
386
|
+
"SmartProxyPool", "ProxySiteStats",
|
|
387
|
+
# browser pool
|
|
388
|
+
"BrowserPool",
|
|
389
|
+
# record/replay
|
|
390
|
+
"HttpRecorder", "SessionReplayer", "RecordedEntry", "record_session",
|
|
391
|
+
# captcha farm
|
|
392
|
+
"CaptchaFarm", "SolveResult",
|
|
393
|
+
# module-level verbs
|
|
394
|
+
"request",
|
|
395
|
+
"get",
|
|
396
|
+
"post",
|
|
397
|
+
"put",
|
|
398
|
+
"patch",
|
|
399
|
+
"delete",
|
|
400
|
+
"head",
|
|
401
|
+
"options",
|
|
402
|
+
]
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
def request(method: str, url: str, *, browser: str = "chrome136", **kw: Any) -> Response:
|
|
406
|
+
"""One-shot request. Prefer a :class:`Session` for anything repeated —
|
|
407
|
+
it reuses connections and keeps cookies."""
|
|
408
|
+
session_keys = (
|
|
409
|
+
"proxy", "proxy_pool", "rotate", "platform", "backend", "verify",
|
|
410
|
+
"http2", "delay", "retries", "circuit_breaker", "isolate_cookies",
|
|
411
|
+
"accept_language", "base_url", "detect_bans", "max_redirects",
|
|
412
|
+
)
|
|
413
|
+
skw = {k: kw.pop(k) for k in list(kw) if k in session_keys}
|
|
414
|
+
with Session(browser=browser, **skw) as s:
|
|
415
|
+
return s.request(method, url, **kw)
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
def get(url: str, **kw: Any) -> Response:
|
|
419
|
+
return request("GET", url, **kw)
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
def post(url: str, **kw: Any) -> Response:
|
|
423
|
+
return request("POST", url, **kw)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def put(url: str, **kw: Any) -> Response:
|
|
427
|
+
return request("PUT", url, **kw)
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
def patch(url: str, **kw: Any) -> Response:
|
|
431
|
+
return request("PATCH", url, **kw)
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
def delete(url: str, **kw: Any) -> Response:
|
|
435
|
+
return request("DELETE", url, **kw)
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
def head(url: str, **kw: Any) -> Response:
|
|
439
|
+
return request("HEAD", url, **kw)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
def options(url: str, **kw: Any) -> Response:
|
|
443
|
+
return request("OPTIONS", url, **kw)
|
stealthhttp/_core.pyd
ADDED
|
Binary file
|