vkavalerov / wework-desk-booking-automation

3 stars 0 forks source link

Not booking desks for some days #5

Open kavalerov opened 12 months ago

kavalerov commented 12 months ago

I have tried booking desks today with the following .env:

EMAIL=***
PASSWORD=***
OFFICE_ID=6523144c-2215-11e8-a719-0eea07b0dbbc
TIME_OFFSET=0
DAYS=7
WEEKENDS=FALSE
BROWSER=safari

I also have a desk booked for today.

Running the script produced the following logs:

A desk for Mon Sep 18 2023 successfully booked.
A desk for Tue Sep 19 2023 successfully booked.
A desk for Wed Sep 20 2023 successfully booked.
A desk for Thu Sep 21 2023 successfully booked.

And I interrupted it after thu.

The problem:

vkavalerov commented 11 months ago

Thanks a lot for feedback and bug description!

So first of all speaking of situations when you have already booked desks for some days that this script is going through, if it is the same office, then WeWork website will show message that desk for this day in this office is already booked, and it should not affect script work, but if you are booking desks in another office, then it may cost you WeWork credits, because you theoretically can book a desk for same day in several offices, but once again it may not affect script work, at least I hope so😅.

I think the problem may be in the page loading time, have you tried to increase TIME_OFFSET in .env? If so, have it resolved the issue? (Also please pull latest changes that I made in repo)

Also keep in mind that it still can't go to next months during booking process, definitely will fix this in future.

Once again, thanks for feedback!

vkavalerov commented 11 months ago

@kavalerov It should now go to next month if needed, it was pretty easy to do.