问题
I'm using UrlFetchApp for API requests.
var url = "https://api.bol.com/catalog/v4/search/?....
var response = UrlFetchApp.fetch(url);
I need to make 1 API request for each item (unfortunately no way around that).
With few items I don't seem to have a problem. When I have over 20 items I often get an "address unavailable" error.
I only have this issue when using Google Spreadsheets, so I'm quite sure the problem lies there. From my server I can do hundreds of requests in a row without issue.
I've tried putting in a delay with using Utilities.sleep to slow down the request rate. That doesn't seem to be the issue.
How to get rid of this error?
来源:https://stackoverflow.com/questions/44831451/google-app-script-urlfetchapp-frequent-address-unavailable-error