Created
February 28, 2021 22:16
-
-
Save camtheman256/3125e18ba20e90b6252678714e5102fd to your computer and use it in GitHub Desktop.
Export when2meet data from JS console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
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
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'