Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netiv Hasad Fail #75

Merged
merged 2 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions il_supermarket_scarper/scraper_stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class NetivHased(FullyStable):
"""Netiv Hased is stablity"""

@classmethod
def executed_in_saturday(cls, when_date=None, **_):
def executed_in_saturday(cls, **_):
"""if the execution is in saturday"""
return when_date and _is_saturday_in_israel(when_date)
return _is_saturday_in_israel()

@classmethod
def failire_valid(cls, when_date=None, utilize_date_param=False, **_):
Expand Down
4 changes: 4 additions & 0 deletions il_supermarket_scarper/scrappers_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
from enum import Enum
import il_supermarket_scarper.scrappers as all_scrappers
from il_supermarket_scarper.scraper_stability import ScraperStability


class ScraperFactory(Enum):
Expand Down Expand Up @@ -95,4 +96,7 @@ def is_scraper_enabled(cls, enum):
disabled_scrappers = list(map(str.strip, env_var_value.split(",")))
if enum.name in disabled_scrappers:
return False
#
if ScraperStability.is_validate_scraper_found_no_files(enum):
return False
return True
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tests_require=dev_required,
extras_require={"test": ["pytest", "pytest-xdist"]},
# *strongly* suggested for sharing
version="0.5.1",
version="0.5.2",
# The license can be anything you like
license="MIT",
description="python package that implement a scraping for israeli supermarket data",
Expand Down
Loading