https://en.wikipedia.org/w/api.php?action=query&prop=extracts&explaintext&format=json&origin=*&pageids=1338305(article link) 返回
import { Selector } from 'testcafe';
export default class BillingPage {
constructor () {
this.cardNameInput = Selector('#cc_name');
this.cardNumberInput = Selector('#credit-card-number');
this.saveButton = Selector('button').withText('Save Card');
this.successMessage = Selector('div').withText('Your billing information has been successfully updated.');
}
async enterBillingInformation(cardNum, t) {
await t
.typeText(this.cardNameInput, 'Foo Bar')
.typeText(this.cardNumberInput, cardNum)
}
}
{
"batchcomplete": "",
"warnings": {
"extracts": {
"*": "\"exlimit\" was too large for a whole article extracts request, lowered to 1."
}
},
"query": {
"pages": {
"1338305": {
"pageid": 1338305,
"ns": 0,
"title": "Privacy policy",
"extract": ""
}
}
}
}
为空。
但是相同的API调用另一篇普通文章 https://en.wikipedia.org/w/api.php?action=query&prop=extracts&explaintext&format=json&origin=*&pageids=7712095(article link) 返回通常的正确响应:
extract
答案 0 :(得分:0)
看起来像是固定的-现在GET返回文章。