Skip to content

bertrandda/par-ici-tennis

Repository files navigation

par-ici-tennis (Parisii tennis)

Script to automatically book a tennis court (on https://tennis.paris.fr)

"Par ici" mean "this way" in french. The "Parisii" were a Gallic tribe that dwelt on the banks of the river Seine. They lived on lands now occupied by the modern city of Paris. The project name can be interpreted as "For a Parisian tennis, follow this way"

NOTE: They recently added a CAPTCHA during reservation process. The latest version should pass through. If it fails, open an issue with error logs, I will try to find an other way.

Table of Contents

Prerequisites

  • Node.js >= 20.6.x
  • A "carnet de réservation" in your Paris Tennis account (see Payment process)

Get started

Configuration

Create config.json file from config.json.sample and complete with your preferences.

  • location: a list of courts ordered by preference - full list

You can use two formats for the locations field:

  1. Array format:
"locations": [
  "Valeyre",
  "Suzanne Lenglen",
  "Poliveau"
]

Use this if you want to search all courts at each location, in order of preference.

  1. Object format (with court numbers):
"locations": {
  "Suzanne Lenglen": [5, 7, 11],
  "Henry de Montherlant": []
}

Use this if you want to specify court numbers for each location. An empty array means all courts at that location will be considered.

Choose the format that best matches your preferences.

  • date a string representing a date formated D/M/YYYY, if not set the date 6 days in future is used

  • hours a list of hours ordered by preference

  • priceType an array containing price type you can book Tarif plein and/or Tarif réduit

  • courtType an array containing court type you can book Découvert and/or Couvert

  • players list of players 3 max (without you)

Payment process

To pass the payement phase without trouble you need a "carnet de réservation", be carefull you need a "carnet" that maches with your priceType & courtType combination selected previously

Running

To run this project locally, install the dependencies

npm install

and run the script:

npm start

To test your configuration, you can run this project in dry-run mode. It will check court availability but no reservations will be made:

Important

due to a bug on the booking website, it is temporarily impossible to cancel a booking before final payment. The dry-run is therefore non-functional, and the command has been deactivated to avoid leaving an unsuccessful order. You can still try out using the classic launch command npm start, but you'll have to cancel the reservation manually (possible up to 24 hours before the reservation date).

npm run start-dry

You can start script automatically using cron or equivalent

Contributing

Contributions and bug reports are welcome! Please open an issue or submit a pull request.

License

MIT

About

Book Paris tennis court (include CAPTCHA bypass)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •