Commit History
-
style: remove unused import
Karim shoair10ff0d5 -
fix: update code and docstrings to remove the old google referer logic
Karim shoaira28879b -
build: pump up deps and browsers versions
Karim shoair7bd4753 -
Merge branch 'dev' into fix/google-referrer-spoof
Karim shoair6bb2723 -
fix: return bare Google URL in referer instead of search query
Real browsers send `https://www.google.com/` as the Referer header when clicking search results, not the full search URL with query parameters. The previous format was a fingerprinting signal that the referer was spoofed. Closes #1728b89653
-
- Add pre-compiled XPath text selector
- Avoid recursion133ff8f -
fix: Selector.get_all_text() doesn't get all text #167
- Updated text extraction using recursion - Added new unit testc9a1787
-
fix(type hints): use correct import for Python < 3.12 (Fixes #163 )
Karim shoair1c774eb
-
build: pump up the version
Karim shoair +1: Christian RostCo-Authored-By: Christian Rost <chr@baltic-online.de>a29b545 -
fix(browsers): make flag concatenation type-safe
Karim shoair +1: Christian RostBetter implementation of #157 that's accepted by pyright/mypy. Thanks to @rostchri . Co-Authored-By: Christian Rost <chr@baltic-online.de>814b9a6
-
fix(stealth): improve stealth mode by removing unnecessary scripts
Karim shoairIt doesn't add anything to the table as before (it might turn out I was wrong and add them again lol)cf06b6e -
fix(mcp): make mcp use less tokens by striping useless tags
Karim shoair130d1d8 -
fix(solver): Solve CF faster and handle websites that show captcha twice
Karim shoair446b9d5
-
build: pump version up and the deps
Karim shoair138d6ee -
fix: complete MCP schema validation for remaining bare array types
Karim shoair- Fix params (Dict|List|Tuple → Dict), urls (Tuple[str,...] → List[str]), - Renamed _NormalizeCredentials/_ContentTranslator to snake_case. - Also, raise a ValueError on invalid credentials instead of returning None silently.5f93804 -
Merge branch 'dev' into fix/mcp-schema-auth-cookies
Karim shoairc3afea7
-
fix: make MCP get schemas validator-safe
Robin EdeUse JSON-object input types for cookies and basic-auth fields in get and bulk_get so strict MCP schema validators can register tools reliably. Normalize auth dictionaries to the tuple format expected by fetchers to preserve runtime behavior.0d7a361
-
fix: improve regex precision for Cloudflare challenge detection
RinZ27979ef6f
-
fix(checkpoint): correct error message
Karim shoair3ddd178 -
fix(spiders): corrections and removal of dead code
Karim shoairc923d18 -
style: docstrings corrections for accuracy
Karim shoair5618e2f
-
fix: make browser fetchers type hints always present
Karim shoair7d2ea72 -
fix: use more accurate naming for proxy rotation strategy
Karim shoairIt can be considered the simplest form of round robin since we don't have weights or anything (as was originally planned), but let's change it to avoid confusion or useless debates. Here goes nothing61a910a -
fix(parser)!: Optimize parser for repeated operations
Karim shoaira1afba2
-
style(spiders): Lower the default number of concurrent requests
Karim shoair288b1a4 -
fix: add typed overloads to Selectors.get() for proper default type inference
Karim shoairType checkers now correctly infer the return type based on the default value: - .get() → TextHandler | None - .get("") → TextHandler | str - .get(0) → TextHandler | intb942a24
-
build: pump up the version status
Karim shoairc2167a0 -
style: expose `ProxyRotator` class to the public API
Karim shoair04eb5f9
-
style: Use shorter and more accurate naming for constants
Karim shoairc2dbf4c -
build: pump up version and deps
Karim shoair7c5afe3 -
style: Fix all mypy errors and add type hints to untyped function bodies
Karim shoair**Resolved all 65 mypy errors across 14 files and added type annotations to all previously untyped function bodies. Final result: 0 errors with --check-untyped-defs enabled, all 454 tests pass.** `scrapling/core/_types.py` - Removed broken Self = object fallback — now requires typing_extensions for Python < 3.11 `scrapling/core/storage.py` - Fixed str/bytes mismatch in _get_hash() — used separate _identifier_bytes variable instead of reassigning from str to bytes `scrapling/core/custom_types.py` - split() return type: Union[List, "TextHandlers"] → list[Any] (avoids LSP violation with parent list[str]) - format() kwargs: **kwargs: str → **kwargs: object (matches parent str.format signature) - AttributesHandler.__init__: Added mapping: Any = None, **kwargs: Any and -> None - json_string property: Added -> bytes return type `scrapling/core/mixins.py` - Changed self: "Selector" to self: Any on all mixin methods (mypy can't handle forward-reference self types on non-su…31c2447
-
feat(browsers): Add option to block requests to specific domains
Karim shoair47dd985 -
style(parser): Improve the type hint for `find_by_text` and `find_by_regex`
Karim shoairf67ebd1 -
fix(response): Force the body of the response to always be bytes
Karim shoair1b8cc6b -
feat(parser)!: Make all selection return selector objects by default
Karim shoair- The strings/Texthandlers are only returned by `get`/`getall`/`extract`/`extract_first`. This makes the type checking/autocompletion experience consistent. - Removed `css_first` and `xpath_first` since it doesn't make sense to leave them now. - Made the type hints more accurate in multiple places.a5f9b38
-
feat(proxy control): Force a proxy at request level at any given point
Karim shoairAnd merge request's meta with response's meta32daccc
-
feat(spiders/fetchers): Adding proxy rotation logic and change retry logic
Karim shoair- User passes a single proxy to the browser session, and it will keep using the same context. Pass a proxy manager that automatically refreshes the IP with each proxy, and you get speed but sacrifice some stealth. - User imports the proxy rotator class and passes proxies to it and a rotation strategy (Round robin by default). Then pass the instance to the session class, which will create a context and a tab for each proxy returned by the rotator. This way, you sacrifice speed a bit, but you get maximum stealth since each context is created with the proxy that will be used. - Normal requests use what you pass without issues, of course. - All errors are retried now, and proxies are rotated on retries automatically.ed96cdc
-
fix(browsers): Improve stealth and speed by adjusting flags
Karim shoair88b6ab5 -
fix(browsers): disable autoplay for all browsers
Karim shoair1d04135
-
feat(parser): replacing `tldextract` with `tld` library
Karim shoairThis might break the adaptive data users have for websites BUT: 1. tld uses ~3.7x less memory during extraction operations (1.5 MB vs 5.7 MB). 2. tld uses ~56% less memory on import (5.2 MB vs 11.9 MB). 3. Zero dependencies (vs 3 for tldextract). In return, it's 30ms slower for extracting 5000 URLs, which is negligible. Also, the type hints aren't always accurate, but it's fine; I corrected them.e5733cb
-
fix(requests): return the cached fingerprint on second call
Karim shoaire30685e -
feat(spiders/requests): Use a reliable method for fingerprint generation
Karim shoaire227110 -
style: update post requests type hints to be more accurate
Karim shoairc3c5ac6 -
build: Add w3lib to deps
Karim shoairda0d22b
-
feat(spiders): Make graceful shutdown always enabled
Karim shoair5ec9f75 -
fix(spiders): handle errors with manual pause during stream mode
Karim shoair47633d8 -
fix(spiders): fix a bug with session stats counter
Karim shoair98a7a0d -
fix(spiders): Fix for when the pausing system has large queue
Karim shoair59117ec -
feat(spiders): Add pause/resume system for crawls
Karim shoair1721cbb
-
fix(browsers): solving an issues with leaving playwright loop open when cdp connection fails
Karim shoairThis has been causing issues with tests for a long time, and now finally found the reason.8ff23b3