Not all of the view-source:http://www.portofhueneme.org/home.php from the site is retreived from UrlFetchApp.fetch().getContentText
.
I heard UrlFetchApp is just a wrapper for python's urllib2 module. A previous post mentioned that urllib2 does not fetch context which is dynamically generated from script, but I can't find any scripts which would generate the rest of the page.
I'm trying to get the date listed under 'important announcements.'
function test_date() {
var url = UrlFetchApp.fetch('http://www.portofhueneme.org/home.php') ;
var text= hueneme_url.getContentText() ;
Logger.log(hueneme_text) ;
var pattern = /Current Vessel Schedule/
var start = hueneme_text.search(pattern) ;
Logger.log("\n"+start) ;
}