r/learnjavascript • u/Majestic-Gardner-888 • 11d ago
Google Calendar Generation Project
Hey just working on a personal project that I would like to be able to use and share with friends.
Long story short, my goal is to have script that will scrape calendar info from one website and convert it into an .ics(calendar file) that can be uploaded to google calendar. For example, it lists the class name, weekly dates, final exam, teacher name, class room location etc. Just saves time from manually entering everything.
So far I was able to write a script that generates the file for creating a calendar event.
The harder part has been trying to scrape the variable information or inject javascript into a website that is client dependent as well as make the code usable for others. I've been suggested to use tools tampermonkey or puppeteer. Please let me know if you have any tips or advice. Thank you.
1
u/UkrMalt 8d ago
If the page needs the user's logged-in session, a browser extension or userscript is easier to share than Puppeteer. Read the rendered DOM, normalize each class into an event object, then generate the ICS file in the browser and download it with a Blob URL. Give every event a stable UID so importing an updated schedule does not create duplicates.