Last active
March 30, 2020 07:33
-
-
Save interdigitize/fb23d7491827d48351e655d67ce228f9 to your computer and use it in GitHub Desktop.
Scrape and save data to Google Sheets with Apps Script - fetch site content
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
var url = "http://publichealth.lacounty.gov/media/Coronavirus/locations.htm" | |
//fetch site content | |
var websiteContent = UrlFetchApp.fetch(url).getContentText(); | |
var fetchTime = Utilities.formatDate(new Date(), 'Etc/GMT', "yyyy-MM-dd HH:mm:ssZ"); // "yyyy-MM-dd'T'HH:mm:ss'Z'" | |
Logger.log('website content: ' + websiteContent); | |
Logger.log('fetch time: ' + fetchTime); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment