我的剧本:
var Url = 'http://readonline.egscans.com/Remnant/Chapter_036_[END]';
var response = UrlFetchApp.fetch(Url).getContentText();
运行脚本时出现此错误。
“参数无效:http://readonline.egscans.com/Remnant/Chapter_036_[END]”
答案 0 :(得分:3)
您可以使用encodeURIComponent对URL进行编码,如下所示:
var Url = encodeURIComponent('http://readonline.egscans.com/Remnant/Chapter_036_[END]');
参考:https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent