Trying to read titles from urls in google spreadsheet -


i've created function call title of given url google spreadsheets. now, seems inconsistent refresh code , works , following error same url worked previously:

typeerror: cannot read property "title" undefined.

i mean, links have titles not sure means? works, doesn't..

   function grabtitle(url) {           var response = urlfetchapp.fetch(url);           var doc = xml.parse(response.getcontenttext(),true);           var title = doc.html.head.title.gettext();       if (title == '') {         return "unknown";       }         else {           return title;           }     } 


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -