我正在尝试通过 POST 自动填写 Google 表单。然而,当我实际将数据发布到其中时,只有第一页的问题实际上被填写了。
示例代码:
private static void PostToFormTest()
{
WebClient client = new WebClient();
var keyValue = new NameValueCollection();
keyValue.Add("entry.843521592", "Option 1");
keyValue.Add("entry.901429584", "Test Right Now");
keyValue.Add("entry.347619935", "Test Page 2");
Uri uri = new Uri("https://docs.google.com/forms/d/1zuQxyoRUQ-jYwTf7wrPu9Wqln8ec7gfhzRbOILD3LGU/formResponse");
byte[] response = client.UploadValues(uri, "POST", keyValue);
string result = Encoding.UTF8.GetString(response);
}
回应表:
https://docs.google.com/spreadsheets/d/1B4OSjQRQ37Q5Dt4mxMAx0wx5LfyajvWf_5rCY4lOvBU/edit?usp=sharing
Form:
https://docs.google.com/forms/d/1zuQxyoRUQ-jYwTf7wrPu9Wqln8ec7gfhzRbOILD3LGU/viewform
将此键添加到您的 NameValueCollection 中。
keyValue.Add("pageHistory", "0,1,2");//Comma separated page indexes (this is for 3 pages`enter code here`)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)