Skip to content

Instantly share code, notes, and snippets.

@camtheman256
Created February 28, 2021 22:16
Show Gist options
  • Save camtheman256/3125e18ba20e90b6252678714e5102fd to your computer and use it in GitHub Desktop.
Save camtheman256/3125e18ba20e90b6252678714e5102fd to your computer and use it in GitHub Desktop.
Export when2meet data from JS console
function exportData() {
const peopleMap = {};
for(let i = 0; i < PeopleIDs.length; i++) {
peopleMap[PeopleIDs[i]] = PeopleNames[i];
}
nameAtSlot = AvailableAtSlot.map(e => e.map(i => peopleMap[i]));
timedNames = TimeOfSlot.map((e, i) => [e, nameAtSlot[i]]);
return JSON.stringify(timedNames);
}
@fischman
Copy link

fischman commented May 4, 2024

FWIW when2meet also seems to support (at least now), a csv query param that will serve the data as CSV (though transposed from the versions above here in the gist).

Example: filled in a couple of peoples' responses in https://www.when2meet.com/?24892637-Evxyx and can get the CSV with a simple request (note the trailing &csv):

$ curl 'https://www.when2meet.com/?24892637-Evxyx&csv'
,Monday 09:00:00,Monday 09:15:00,Monday 09:30:00,Monday 09:45:00,Monday 10:00:00,Monday 10:15:00,Monday 10:30:00,Monday 10:45:00,Monday 11:00:00,Monday 11:15:00,Monday 11:30:00,Monday 11:45:00,Monday 12:00:00,Monday 12:15:00,Monday 12:30:00,Monday 12:45:00,Monday 13:00:00,Monday 13:15:00,Monday 13:30:00,Monday 13:45:00,Monday 14:00:00,Monday 14:15:00,Monday 14:30:00,Monday 14:45:00,Monday 15:00:00,Monday 15:15:00,Monday 15:30:00,Monday 15:45:00,Monday 16:00:00,Monday 16:15:00,Monday 16:30:00,Monday 16:45:00,Tuesday 09:00:00,Tuesday 09:15:00,Tuesday 09:30:00,Tuesday 09:45:00,Tuesday 10:00:00,Tuesday 10:15:00,Tuesday 10:30:00,Tuesday 10:45:00,Tuesday 11:00:00,Tuesday 11:15:00,Tuesday 11:30:00,Tuesday 11:45:00,Tuesday 12:00:00,Tuesday 12:15:00,Tuesday 12:30:00,Tuesday 12:45:00,Tuesday 13:00:00,Tuesday 13:15:00,Tuesday 13:30:00,Tuesday 13:45:00,Tuesday 14:00:00,Tuesday 14:15:00,Tuesday 14:30:00,Tuesday 14:45:00,Tuesday 15:00:00,Tuesday 15:15:00,Tuesday 15:30:00,Tuesday 15:45:00,Tuesday 16:00:00,Tuesday 16:15:00,Tuesday 16:30:00,Tuesday 16:45:00,Wednesday 09:00:00,Wednesday 09:15:00,Wednesday 09:30:00,Wednesday 09:45:00,Wednesday 10:00:00,Wednesday 10:15:00,Wednesday 10:30:00,Wednesday 10:45:00,Wednesday 11:00:00,Wednesday 11:15:00,Wednesday 11:30:00,Wednesday 11:45:00,Wednesday 12:00:00,Wednesday 12:15:00,Wednesday 12:30:00,Wednesday 12:45:00,Wednesday 13:00:00,Wednesday 13:15:00,Wednesday 13:30:00,Wednesday 13:45:00,Wednesday 14:00:00,Wednesday 14:15:00,Wednesday 14:30:00,Wednesday 14:45:00,Wednesday 15:00:00,Wednesday 15:15:00,Wednesday 15:30:00,Wednesday 15:45:00,Wednesday 16:00:00,Wednesday 16:15:00,Wednesday 16:30:00,Wednesday 16:45:00,Thursday 09:00:00,Thursday 09:15:00,Thursday 09:30:00,Thursday 09:45:00,Thursday 10:00:00,Thursday 10:15:00,Thursday 10:30:00,Thursday 10:45:00,Thursday 11:00:00,Thursday 11:15:00,Thursday 11:30:00,Thursday 11:45:00,Thursday 12:00:00,Thursday 12:15:00,Thursday 12:30:00,Thursday 12:45:00,Thursday 13:00:00,Thursday 13:15:00,Thursday 13:30:00,Thursday 13:45:00,Thursday 14:00:00,Thursday 14:15:00,Thursday 14:30:00,Thursday 14:45:00,Thursday 15:00:00,Thursday 15:15:00,Thursday 15:30:00,Thursday 15:45:00,Thursday 16:00:00,Thursday 16:15:00,Thursday 16:30:00,Thursday 16:45:00,Friday 09:00:00,Friday 09:15:00,Friday 09:30:00,Friday 09:45:00,Friday 10:00:00,Friday 10:15:00,Friday 10:30:00,Friday 10:45:00,Friday 11:00:00,Friday 11:15:00,Friday 11:30:00,Friday 11:45:00,Friday 12:00:00,Friday 12:15:00,Friday 12:30:00,Friday 12:45:00,Friday 13:00:00,Friday 13:15:00,Friday 13:30:00,Friday 13:45:00,Friday 14:00:00,Friday 14:15:00,Friday 14:30:00,Friday 14:45:00,Friday 15:00:00,Friday 15:15:00,Friday 15:30:00,Friday 15:45:00,Friday 16:00:00,Friday 16:15:00,Friday 16:30:00,Friday 16:45:00
"Alice",Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No
"Bob",No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,No,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No,No,No,No,No,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,Yes,No

@Ulyssys
Copy link

Ulyssys commented Aug 27, 2024

https://www.when2meet.com/?24892637-Evxyx&csv

Does this still work? It seems to return an empty response from the server when I try it.

@fischman
Copy link

https://www.when2meet.com/?24892637-Evxyx&csv

Does this still work? It seems to return an empty response from the server when I try it.

Doesn't seem to work anymore :/
Asked [email protected] to see if they have an alternative/updated suggestion.

@fischman
Copy link

https://www.when2meet.com/?24892637-Evxyx&csv

Does this still work? It seems to return an empty response from the server when I try it.

Doesn't seem to work anymore :/ Asked [email protected] to see if they have an alternative/updated suggestion.

They said it was accidentally broken and now fixed.

@aculich
Copy link

aculich commented Aug 27, 2024

@Ulyssys @fischman @Severrinn I pushed an updated version of this that goes beyond the original gist and implements the code as a convenient bookmarklet so it's a drag-drop-click-n-go to download a csv with the details.

Check it out here: https://aculich.github.io/when2meet-extractor/

image

And see the github repo here: https://github.com/aculich/when2meet-extractor/

@josegaspar999
Copy link

josegaspar999 commented Jan 27, 2025

https://www.when2meet.com/?24892637-Evxyx&csv

Does this still work? It seems to return an empty response from the server when I try it.

Doesn't seem to work anymore :/ Asked [email protected] to see if they have an alternative/updated suggestion.

They said it was accidentally broken and now fixed.

I have a correction to the next text that I wrote "I have just tried it, got a file from the output of curl, but got some data wrong: at least in one appointment there is a mismatch, the browser shows 5th/Feb 15:00 while the CSV shows Feb 4 13:30."

CORRECTION: The person I checked the response (and knew that could not be the response) actually answered again later in the way I was expecting. I saw the first answer, not the second. Interestingly, I believe the two answers entered When2Meet just because the username changed "name surname" to "name surname " (see the space after surname). Please excuse the confusion I created with my text.

@fischman
Copy link

I have just tried it, got a file from the output of curl, but got some data wrong: at least in one appointment there is a mismatch, the browser shows 5th/Feb 15:00 while the CSV shows Feb 4 13:30.

Is this perhaps a timezone issue?
when2meet allows setting a TZ on the event, and the &csv version you get is in the event's TZ. So for example https://www.when2meet.com/?28661143-TPGgR has a time range of 9a-5p in the Australia/Darwin TZ, and curl'ing https://www.when2meet.com/?28661143-TPGgR&csv agrees, but viewing the event in a browser with "Your Time Zone" (on the when2meet page) set to US/Pacific shows appointment slots in 3p-12a.
I don't see the event TZ being sent back on the &csv URL but my guess is that when2meet's owner would add it if asked considering previously excellent responsiveness.
If you need a more immediate way to detect event TZ you can download its non-CSV version and muck through the embedded JS, like this hack: curl -s 'https://www.when2meet.com/?28661143-TPGgR' |sed -ne '/timezone !=/s/.*"\([A-Za-z0-9/_+-]*\)".*/\1/p'

@josegaspar999
Copy link

josegaspar999 commented Jan 28, 2025

Dear fischman, many thanks for your suggestion you gave to solve my problem. Now I found the problem was a mistake I made: The person I checked the response (and knew that could not be the response) actually answered again later in the spot I was expecting. So online I saw the expected slot, in the CSV, the spot was wrong in a first line, and was correct in a later line. In my mind the same person could not appear two times, so I went to check the two answers and found one space character difference: "name surname" vs "name surname ". Please excuse the confusion I have created and thanks again for the suggestion you gave. At this moment I see your original solution working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment