UrlFetchApp Timeout

611 views
Skip to first unread message

KGuiste1

unread,
Apr 29, 2022, 4:51:38 AM4/29/22
to Google Ads Scripts Forum
Hi,

I've been trying to utilise the below script code:

var HTTP_OPTIONS = {
    muteHttpExceptionstrue
};
try{
      response_code = UrlFetchApp.fetch(newUrlHTTP_OPTIONS).getResponseCode();
catch(e){
  log(e);
}

After 6 minutes of trying I get this:

can you help me figure out why UrlFetchApp is timing out?

Sigurd Fabrin

unread,
May 2, 2022, 4:04:15 AM5/2/22
to Google Ads Scripts Forum
Hi, the problem is with the specific URL you're using, not with UrlFetchApp

Btw: remember to check with the robots.txt file before you start scraping. Not everyone appreciates bots on their sites

Screenshot 2022-05-02 at 10.00.33.png


Sigurd

Google Ads Scripts Forum Advisor

unread,
May 3, 2022, 2:09:25 AM5/3/22
to adwords...@googlegroups.com

Hello,

I’m James from the Google Ads scripts support team. Thank you for reaching out to us.

I concur with the suggestion given by Sigurd. However, I believe that it’s best if you consult this with the Apps script support team as they are more knowledgeable with the functionality and behavior of the said UrlFetchApp. Take note that the UrlFetchApp method is not Google Ads script specific method but instead it is built in method within App Script. 

That said, could you please reach to the Google Apps Script support team by following the given instructions on this guide?

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2aOmmr:ref
Reply all
Reply to author
Forward
0 new messages