-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from D4Vinci/dev
v0.2.8
- Loading branch information
Showing
32 changed files
with
186 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[flake8] | ||
ignore = E501 # line too long | ||
exclude = .git,__pycache__,docs,.github,build,dist | ||
ignore = E501, F401 | ||
exclude = .git,.venv,__pycache__,docs,.github,build,dist,tests,benchmarks.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
repos: | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.8 | ||
rev: 1.8.0 | ||
hooks: | ||
- id: bandit | ||
args: [-r, -c, .bandit.yml] | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.0.0 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
- id: isort | ||
- repo: https://github.com/netromdk/vermin | ||
rev: v1.6.0 | ||
hooks: | ||
- id: vermin | ||
args: ['-t=3.8-', '--violations', '--eval-annotations', '--no-tips'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import shutil | ||
from pathlib import Path | ||
|
||
|
||
# Clean up after installing for local development | ||
def clean(): | ||
# Get the current directory | ||
base_dir = Path.cwd() | ||
|
||
# Directories and patterns to clean | ||
cleanup_patterns = [ | ||
'build', | ||
'dist', | ||
'*.egg-info', | ||
'__pycache__', | ||
'.eggs', | ||
'.pytest_cache' | ||
] | ||
|
||
# Clean directories | ||
for pattern in cleanup_patterns: | ||
for path in base_dir.glob(pattern): | ||
try: | ||
if path.is_dir(): | ||
shutil.rmtree(path) | ||
else: | ||
path.unlink() | ||
print(f"Removed: {path}") | ||
except Exception as e: | ||
print(f"Could not remove {path}: {e}") | ||
|
||
# Remove compiled Python files | ||
for path in base_dir.rglob('*.py[co]'): | ||
try: | ||
path.unlink() | ||
print(f"Removed compiled file: {path}") | ||
except Exception as e: | ||
print(f"Could not remove {path}: {e}") | ||
|
||
|
||
if __name__ == '__main__': | ||
clean() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
# Declare top-level shortcuts | ||
from scrapling.fetchers import Fetcher, StealthyFetcher, PlayWrightFetcher, CustomFetcher | ||
from scrapling.core.custom_types import AttributesHandler, TextHandler | ||
from scrapling.fetchers import (CustomFetcher, Fetcher, PlayWrightFetcher, | ||
StealthyFetcher) | ||
from scrapling.parser import Adaptor, Adaptors | ||
from scrapling.core.custom_types import TextHandler, AttributesHandler | ||
|
||
__author__ = "Karim Shoair ([email protected])" | ||
__version__ = "0.2.7" | ||
__version__ = "0.2.8" | ||
__copyright__ = "Copyright (c) 2024 Karim Shoair" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from .camo import CamoufoxEngine | ||
from .static import StaticEngine | ||
from .pw import PlaywrightEngine | ||
from .constants import DEFAULT_DISABLED_RESOURCES, DEFAULT_STEALTH_FLAGS | ||
from .pw import PlaywrightEngine | ||
from .static import StaticEngine | ||
from .toolbelt import check_if_engine_usable | ||
|
||
__all__ = ['CamoufoxEngine', 'PlaywrightEngine'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.