3

我的脚本:

var Url = 'http://readonline.egscans.com/Remnant/Chapter_036_[END]';
var response = UrlFetchApp.fetch(Url).getContentText();

运行脚本时出现此错误。

“无效参数:http://readonline.egscans.com/Remnant/Chapter_036_[END]

4

1 回答 1

3

您可以使用 encodeURIComponent 对 URL 进行编码,如下所示:

var Url = encodeURIComponent('http://readonline.egscans.com/Remnant/Chapter_036_[END]');

参考:https ://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent

于 2012-06-28T01:41:09.837 回答