Scrape CCAS tickets and notify you.
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 CCASholidays.py: notify about stay offers of CCAS
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.txtConfigure
# Configure environment settings
cp env.dist env.yamlEdit 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.
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 regionsHow 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"},
...
]
}
