{"id":8260,"date":"2021-10-06T22:36:52","date_gmt":"2021-10-07T03:36:52","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=8260"},"modified":"2021-10-11T14:46:12","modified_gmt":"2021-10-11T19:46:12","slug":"8260","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=8260","title":{"rendered":"Scraping Google Calendar Data, take 2"},"content":{"rendered":"<p>I had written a script that <a href=\"https:\/\/github.com\/ljr55555\/getInfoFromPublicGoogleCalendar\" target=\"_blank\" rel=\"noopener\">uses the Google Calendar API to pull records from the Township&#8217;s calendar<\/a>. Unfortunately, the pickle \/ token \/ whatever has started expiring every week. Which means manual intervention is required for my automated process to run. Which made me wonder &#8230; for a private calendar, it makes sense to use the API. I <em>need<\/em> to authenticate in order to read my private appointments. I can get the token to last for a year, but then I&#8217;ve got to go through whatever to be a real \/ approved application. Which is a lot of effort for something that I&#8217;m using to read my own data. Which made me wonder why I need to authenticate to read events on a public calendar!?<\/p>\n<p>Turns out I don&#8217;t. I just need to use the iCal feed for the calendar. Using requests to pull data from a URL and then parsing out the iCal data is simple enough. So now I have a <a href=\"https:\/\/github.com\/ljr55555\/getInfoFromiCal\" target=\"_blank\" rel=\"noopener\">script that pulls the iCal file to populate my Exchange calendar<\/a>. Since it&#8217;s unauthenticated, I shouldn&#8217;t have to do anything to get it working again next week \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had written a script that uses the Google Calendar API to pull records from the Township&#8217;s calendar. Unfortunately, the pickle \/ token \/ whatever has started expiring every week. Which means manual intervention is required for my automated process to run. Which made me wonder &#8230; for a private calendar, it makes sense to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[1309,1472,664],"class_list":["post-8260","post","type-post","status-publish","format-standard","hentry","category-coding","tag-google-calendar-api","tag-ical","tag-python"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8260"}],"version-history":[{"count":2,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8260\/revisions"}],"predecessor-version":[{"id":8262,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8260\/revisions\/8262"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}