我的豆瓣请求返回是403什么原因
来源:20-11 RESTful API简介及调用豆瓣API
慕先生3223357
2018-01-18
onLoad: function (options) {
var inTheatersUrl = app.globalData.doubanBase +
"/v2/movie/in_theaters" + "?start=0&count=3";
var comingSoonUrl = app.globalData.doubanBase +
"/v2/movie/coming_soon" + "?start=0&count=3";
var top250Url = app.globalData.doubanBase +
"/v2/movie/top250" + "?start=0&count=3";
this.getMovieListData(inTheatersUrl, "inTheaters", "正在热映");
this.getMovieListData(comingSoonUrl, "comingSoon", "即将上映");
this.getMovieListData(top250Url, "top250", "top250");
},
onMoreTap: function (event) {
var category = event.currentTarget.dataset.category;
wx.navigateTo({
url: "more-movies/more-movies?category=" + category
})
},
getMovieListData: function (url, settedKey, categoryTitle) {
var that = this;
wx.request({
url: url,
header: {
'content-type': 'application/xml' // 默认值
},
method: 'GET',
success: function (res) {
that.processDoubanData(res.data, settedKey, categoryTitle);
},
fail: function () {
console.log("failed");
},
complete: function () {
}
})
},
ps:用浏览器访问没问题,
11回答
-
7七月
2018-01-18
已获悉,正在研究
262018-01-20 -
慕雪4443391
2018-01-18
一开始是部分图片 403,还能将就用. 现在直接整个 API 403 了直接没法学习了..
122023-02-07 -
右席曦
2018-01-18
问+1
10 -
我家大狗最最萌
2018-01-24
也是豆瓣不能访问,好像现在豆瓣也没办法申请了
00 -
雪中无处寻
2018-01-23
我的也是403
00 -
7七月
2018-01-20
基地换成:http://t.yushu.im
052018-01-24 -
慕的地6863477
2018-01-19
一样 我想请问一下 豆瓣api是通过IP来区分请求者的吗?还是什么?
00 -
BioDemo
2018-01-19
00 -
yezs
2018-01-19
同问+1
00 -
provence3658
2018-01-18
今天刚学到获取数据,也遇到了这问题
00 -
慕粉4107578
2018-01-18
同问+1
00
相似问题