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

Use a blacklist for falsely detected activities #231

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 8 additions & 2 deletions src/activities.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"You can track your package": "usps tracking",
}

ACTIVITY_TITLE_TO_IGNORE = [
"Safeguard your family's info",
"Get 50 entries plus 1000 points!",
"Recevez 50 participations et 1000 points !",
]


class Activities:
def __init__(self, browser: Browser):
Expand Down Expand Up @@ -176,8 +182,8 @@ def doActivity(self, activity: dict, activities: list[dict]) -> None:
if activity["complete"] is True or activity["pointProgressMax"] == 0:
logging.debug("Already done, returning")
return
if "Safeguard your family's info" == activityTitle:
logging.debug("Skipping Safeguard your family's info")
if activityTitle in ACTIVITY_TITLE_TO_IGNORE:
logging.debug("Skipping " + activityTitle)
return
# Open the activity for the activity
cardId = activities.index(activity)
Expand Down
Loading