v0.3.14
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
[project]
|
[project]
|
||||||
name = "scrapling"
|
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
|
# 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!"
|
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"}
|
readme = {file = "docs/README.md", content-type = "text/markdown"}
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
@@ -69,7 +69,7 @@ fetchers = [
|
|||||||
"curl_cffi>=0.14.0",
|
"curl_cffi>=0.14.0",
|
||||||
"playwright==1.56.0",
|
"playwright==1.56.0",
|
||||||
"patchright==1.56.0",
|
"patchright==1.56.0",
|
||||||
"browserforge>=1.2.1",
|
"browserforge>=1.2.3",
|
||||||
"msgspec>=0.20.0",
|
"msgspec>=0.20.0",
|
||||||
]
|
]
|
||||||
ai = [
|
ai = [
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
__author__ = "Karim Shoair (karim.shoair@pm.me)"
|
__author__ = "Karim Shoair (karim.shoair@pm.me)"
|
||||||
__version__ = "0.3.13"
|
__version__ = "0.3.14"
|
||||||
__copyright__ = "Copyright (c) 2024 Karim Shoair"
|
__copyright__ = "Copyright (c) 2024 Karim Shoair"
|
||||||
|
|
||||||
from typing import Any, TYPE_CHECKING
|
from typing import Any, TYPE_CHECKING
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ DEFAULT_FLAGS = (
|
|||||||
DEFAULT_STEALTH_FLAGS = (
|
DEFAULT_STEALTH_FLAGS = (
|
||||||
# Explanation: https://peter.sh/experiments/chromium-command-line-switches/
|
# Explanation: https://peter.sh/experiments/chromium-command-line-switches/
|
||||||
# Generally this will make the browser faster and less detectable
|
# Generally this will make the browser faster and less detectable
|
||||||
"--incognito",
|
# "--incognito",
|
||||||
"--test-type",
|
"--test-type",
|
||||||
"--lang=en-US",
|
"--lang=en-US",
|
||||||
"--mute-audio",
|
"--mute-audio",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = scrapling
|
name = scrapling
|
||||||
version = 0.3.13
|
version = 0.3.14
|
||||||
author = Karim Shoair
|
author = Karim Shoair
|
||||||
author_email = karim.shoair@pm.me
|
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!
|
description = Scrapling is an undetectable, powerful, flexible, high-performance Python library that makes Web Scraping easy and effortless as it should be!
|
||||||
|
|||||||
@@ -17,12 +17,16 @@ class TestSQLiteStorageSystem:
|
|||||||
"""Test SQLite storage with an actual file"""
|
"""Test SQLite storage with an actual file"""
|
||||||
with tempfile.NamedTemporaryFile(suffix='.db', delete=False) as tmp_file:
|
with tempfile.NamedTemporaryFile(suffix='.db', delete=False) as tmp_file:
|
||||||
db_path = tmp_file.name
|
db_path = tmp_file.name
|
||||||
|
|
||||||
|
storage = None
|
||||||
try:
|
try:
|
||||||
storage = SQLiteStorageSystem(storage_file=db_path)
|
storage = SQLiteStorageSystem(storage_file=db_path)
|
||||||
assert storage is not None
|
assert storage is not None
|
||||||
assert os.path.exists(db_path)
|
assert os.path.exists(db_path)
|
||||||
finally:
|
finally:
|
||||||
|
# Close the database connection before deleting (required on Windows)
|
||||||
|
if storage is not None:
|
||||||
|
storage.close()
|
||||||
if os.path.exists(db_path):
|
if os.path.exists(db_path):
|
||||||
os.unlink(db_path)
|
os.unlink(db_path)
|
||||||
|
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ class TestConstants:
|
|||||||
def test_flags(self):
|
def test_flags(self):
|
||||||
"""Test default stealth flags"""
|
"""Test default stealth flags"""
|
||||||
assert "--no-pings" in DEFAULT_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
|
assert "--disable-blink-features=AutomationControlled" in DEFAULT_STEALTH_FLAGS
|
||||||
|
|||||||
Reference in New Issue
Block a user