Skip to content

Latest commit

 

History

History
107 lines (75 loc) · 2.82 KB

File metadata and controls

107 lines (75 loc) · 2.82 KB

CCAS Scraper

Status GitHub Issues License

Scrape CCAS tickets and notify you.


📦 About

Scrape tickets from the Caisse centrale d'activités sociales using Prestashop Webservice API.

Important

CCAS updates its products every few days or weeks: daily scripts run is unnecessary. Please be considerate and avoid excessive use.

Warning

You're in charge, use responsibly!

There are two scripts:

  • tickets.py: main script, notify about tickets on CCAS
  • holidays.py: notify about stay offers of CCAS

🌱 Getting Started

Clone the repo, install the packages and copy the config file.

Install

  # Clone repository
  git clone https://github.com/itskovacs/ccas-scraper.git
  cd ccas-scraper

  # Create and activate virtual env
  python -m venv venv
  source venv/bin/activate

  # Install dependencies
  pip install -r requirements.txt

Configure

  # Configure environment settings
  cp env.dist env.yaml

Edit env.yaml with:

  • features: Filter by criterias (regions, departments) (see features)
  • apprise_urls: Notifications URL (see apprise docs)

Important

tickets.py uses both, holidays.py uses only apprise_urls to notify.


📸 Demo


Features

Note

This part is only useful for the tickets.py script. You can find the full list of features in features.md

Setup your filters Edit env.yaml to choose which products to track:

features:
  300: [3070, 3072, 3018] # Track specific departments
  200: [2114, 2115] # Track specific regions

How it works: Each product has properties (features) with specific values. For example:

  • Feature 300 represents departments
  • Feature 200 represents regions When a product matches any of your configured feature values, you'll get notified.

Example This product has department feature (300) with value 3070 (Loire-Atlantique/44). If your config includes 300: [3070], you'll be notified about this product.

"associations": {
  "product_features": [
    ...
    {"id":"300","id_feature_value":"3070"},
    ...
  ]
}