我正在尝试获取所有电影,但 API 仅返回前 10 部电影。任何帮助,将不胜感激。
async getResults(page = 1) {
const apiKey = '#######';
const proxy = 'http://cors-anywhere.herokuapp.com/';
try {
while (page <= 5) {
const res = await axios(`${proxy}http://www.omdbapi.com/? apikey=${apiKey}&s=${this.query}&type=movie&page=${page}`);
this.result = res.data;
this.page = page;
page++;
}
} catch (error) {
console.log(error);
}
}