webook-tel / src /webook /main.ts
Mohammed Foud
all
df99bb4
raw
history blame contribute delete
812 Bytes
import { WeBookLogin } from './login';
import { WeBookBooking } from './book';
export async function main() {
const email = 'mfoud444@gmail.com'; // Replace with your email
const password = '009988Ppooii@@@@'; // Replace with your password
const eventUrl = 'https://webook.com/en/events/mdlbeast-beast-house-ec/book'//'https://webook.com/en/events/ewc-opening-ceremony-2025-tickets/book'; // Replace with your event URL
const login = new WeBookLogin(email, password, 'rr');
const page = await login.login();
if (!page) {
console.error('Login failed. Exiting.');
process.exit(1);
}
const booking = new WeBookBooking(page);
const booked = await booking.bookEvent(eventUrl);
if (booked) {
console.info('Booking succeeded!');
} else {
console.error('Booking failed.');
}
}