stableway / anmeldung-berlin Goto Github PK
View Code? Open in Web Editor NEWThis app will find and book any service.berlin.de appointment that can be booked online.
License: MIT License
This app will find and book any service.berlin.de appointment that can be booked online.
License: MIT License
Thanks! I've update the file appointment.test.js with mailslurp API key, inbox_id, name and phone. I run it in Docker Desktop and it runs, once, with the usual "Leider sind aktuell keine Termine für ihre Auswahl verfügbar." result. But I have no idea how to make this run over and over (with the 60 seconds delay and Terminsuche wiederholen button) since "retries" field is no loger there. Even if I added it, it doesn't have a timeout, so it reached "limit" immediately.
What am I doning wrong?
With command:
docker run -v $(pwd)/output:/home/nicolas/output anmeldung-berlin
And default config.json, I get:
node:internal/modules/cjs/loader:1262
throw err;
^
SyntaxError: /home/nicolas/config.json: Unexpected token
in JSON at position 585
at parse (<anonymous>)
at Object.Module._extensions..json (node:internal/modules/cjs/loader:1259:39)
at Module.load (node:internal/modules/cjs/loader:1069:32)
at Function.Module._load (node:internal/modules/cjs/loader:904:12)
at Module.require (node:internal/modules/cjs/loader:1093:19)
at require (node:internal/modules/cjs/helpers:108:18)
at Object.<anonymous> (/home/myuser/index.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1191:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
at Module.load (node:internal/modules/cjs/loader:1069:32)
at Function.Module._load (node:internal/modules/cjs/loader:904:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47
This is extremely useful, used it for my Anmeldung 4 months ago.
Would be nice to have this also for Abmeldung :)
Some appointments are not booked via the calendar available at service.berlin.de. For these appointments, a link is available on their service page, which links to otv.verwalt-berlin.de.
For example, this service: https://service.berlin.de/dienstleistung/328332/.
These service pages have a link like this:
When I run:
MAILSLURP_API_KEY=*** MAILSLURP_INBOX_ID=*** FORM_NAME="Bobby Brown" FORM_PHONE="0176 5555555" npm run debug
The booking fails while waiting for the email verification code with output like this:
...
2024-01-09 16:20:16 debug: Retrieving booking page for https://service.berlin.de/terminvereinbarung/termin/time/1709030880/169/
2024-01-09 16:20:19 debug: Filling booking form for https://service.berlin.de/terminvereinbarung/termin/time/1709030880/169/
2024-01-09 16:20:19 debug: Writing the configured phone number if the feature is available ...
2024-01-09 16:20:19 debug: Reading all emails from MailSlurp inbox so we can wait for new unread emails ...
2024-01-09 16:20:24 debug: Waiting for email verification code to arrive at inbox with id ... ...
2024-01-09 16:21:25 error: Booking appointment failed at https://service.berlin.de/terminvereinbarung/termin/time/1709030880/169/: fetch failed
I am trying to run the program without setting MAILSLURP_INBOX_ID
to see if that has any effect.
Update: When I do not set MAILSLURP_INBOX_ID
, everything works fine!
No emails have been received to the specified inbox ... maybe this is related to #14 ?
This is not related to the whitespace issue in #14
When I run:
APPOINTMENT_SERVICE="Meldebescheinigung beantragen" FORM_NAME="A name" FORM_PHONE="A phone number" MAILSLURP_API_KEY=*removed* npm run start
I get an error:
> [email protected] start
> npx playwright test --project=appointment
Running 2 tests using 1 worker
[appointment] › appointment.test.js:44:1 › appointment
2024-01-13 05:31:09 warn: Appointment booking failed: Error: Service Meldebescheinigung beantragen not found at https://service.berlin.de/dienstleistungen/
Service Meldebescheinigung beantragen not found at https://service.berlin.de/dienstleistungen/: Error: strict mode violation: getByRole('link', { name: 'Meldebescheinigung beantragen' }) resolved to 2 elements:
1) <a href="https://service.berlin.de/dienstleistung/1…>Meldebescheinigung beantragen</a> aka getByRole('link', { name: 'Meldebescheinigung beantragen', exact: true })
2) <a href="https://service.berlin.de/dienstleistung/3…>Prostitutionstätigkeit/Sexarbeit - Anmeldebeschei…</a> aka getByRole('link', { name: 'Prostitutionstätigkeit/Sexarbeit - Anmeldebescheinigung beantragen' })
Call log:
- Service Meldebescheinigung beantragen not found at https://service.berlin.de/dienstleistungen/ with timeout 5000ms
- waiting for getByRole('link', { name: 'Meldebescheinigung beantragen' })
I need to make an Abmeldung.
Launching your project, but unfortunately, it didn't work. It looks like a new field was added with email address confirmation.
bookingPage.$eval(
"input#email",
(el, config) => (el.value = config.email),
config
),
Looks like we need to add another line like this, just with the correct id.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.