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);
}
@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