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.
- Node.js >= 20.6.x
- A "carnet de réservation" in your Paris Tennis account (see Payment process)
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:
- Array format:
"locations": [
"Valeyre",
"Suzanne Lenglen",
"Poliveau"
]
Use this if you want to search all courts at each location, in order of preference.
- 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 bookTarif plein
and/orTarif réduit
-
courtType
an array containing court type you can bookDécouvert
and/orCouvert
-
players
list of players 3 max (without you)
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
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
Contributions and bug reports are welcome! Please open an issue or submit a pull request.
MIT