diff --git a/pyproject.toml b/pyproject.toml index a5b6f5c..f6fb8ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "scrapling" # Static version instead of a dynamic version so we can get better layer caching while building docker, check the docker file to understand -version = "0.3.13" +version = "0.3.14" description = "Scrapling is an undetectable, powerful, flexible, high-performance Python library that makes Web Scraping easy and effortless as it should be!" readme = {file = "docs/README.md", content-type = "text/markdown"} license = {file = "LICENSE"} @@ -69,7 +69,7 @@ fetchers = [ "curl_cffi>=0.14.0", "playwright==1.56.0", "patchright==1.56.0", - "browserforge>=1.2.1", + "browserforge>=1.2.3", "msgspec>=0.20.0", ] ai = [ diff --git a/scrapling/__init__.py b/scrapling/__init__.py index 0eca2f2..2425686 100644 --- a/scrapling/__init__.py +++ b/scrapling/__init__.py @@ -1,5 +1,5 @@ __author__ = "Karim Shoair (karim.shoair@pm.me)" -__version__ = "0.3.13" +__version__ = "0.3.14" __copyright__ = "Copyright (c) 2024 Karim Shoair" from typing import Any, TYPE_CHECKING diff --git a/scrapling/engines/constants.py b/scrapling/engines/constants.py index db8618c..39e3907 100644 --- a/scrapling/engines/constants.py +++ b/scrapling/engines/constants.py @@ -38,7 +38,7 @@ DEFAULT_FLAGS = ( DEFAULT_STEALTH_FLAGS = ( # Explanation: https://peter.sh/experiments/chromium-command-line-switches/ # Generally this will make the browser faster and less detectable - "--incognito", + # "--incognito", "--test-type", "--lang=en-US", "--mute-audio", diff --git a/setup.cfg b/setup.cfg index 1a02999..23fdc33 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = scrapling -version = 0.3.13 +version = 0.3.14 author = Karim Shoair author_email = karim.shoair@pm.me description = Scrapling is an undetectable, powerful, flexible, high-performance Python library that makes Web Scraping easy and effortless as it should be! diff --git a/tests/core/test_storage_core.py b/tests/core/test_storage_core.py index 241ac0b..1827294 100644 --- a/tests/core/test_storage_core.py +++ b/tests/core/test_storage_core.py @@ -17,12 +17,16 @@ class TestSQLiteStorageSystem: """Test SQLite storage with an actual file""" with tempfile.NamedTemporaryFile(suffix='.db', delete=False) as tmp_file: db_path = tmp_file.name - + + storage = None try: storage = SQLiteStorageSystem(storage_file=db_path) assert storage is not None assert os.path.exists(db_path) finally: + # Close the database connection before deleting (required on Windows) + if storage is not None: + storage.close() if os.path.exists(db_path): os.unlink(db_path) diff --git a/tests/fetchers/test_constants.py b/tests/fetchers/test_constants.py index b873322..36662c6 100644 --- a/tests/fetchers/test_constants.py +++ b/tests/fetchers/test_constants.py @@ -24,5 +24,5 @@ class TestConstants: def test_flags(self): """Test default stealth flags""" assert "--no-pings" in DEFAULT_FLAGS - assert "--incognito" in DEFAULT_STEALTH_FLAGS + # assert "--incognito" in DEFAULT_STEALTH_FLAGS assert "--disable-blink-features=AutomationControlled" in DEFAULT_STEALTH_FLAGS