mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
app: remove custom user-agent header
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const name = ctx.params.name;
|
||||
@@ -10,9 +9,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const name = ctx.params.name;
|
||||
@@ -10,9 +9,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const sourceTimezoneOffset = -8;
|
||||
module.exports = async (ctx) => {
|
||||
@@ -8,9 +7,6 @@ module.exports = async (ctx) => {
|
||||
const res = await axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const currency = require('currency-symbol-map');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const country = ctx.params.country;
|
||||
@@ -13,7 +12,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `http://www.cheapcharts.info/itunes/${country}/apps/detail-view/${id}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -10,9 +9,6 @@ module.exports = async (ctx) => {
|
||||
const res = await axios({
|
||||
method: 'get',
|
||||
url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const locations = ctx.params.locations;
|
||||
@@ -26,7 +25,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: host,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../../utils/axios');
|
||||
const config = require('../../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const bgmCalendarUrl = 'https://api.bgm.tv/calendar';
|
||||
@@ -16,9 +15,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: url[i],
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const data = response.data;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const seasonid = ctx.params.seasonid;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://bangumi.bilibili.com/jsonp/seasoninfo/${seasonid}.ver?callback=seasonListCallback&jsonp=jsonp&_=${+new Date()}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://bangumi.bilibili.com/anime/${seasonid}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://www.bilibili.com/activity/page/list?plat=1,2,3&mold=1&http=3&page=1&tid=0',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.bilibili.com/blackboard/topic_list.html',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const qs = require('querystring');
|
||||
const config = require('../../config');
|
||||
const iconv = require('iconv-lite');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
@@ -13,7 +12,6 @@ module.exports = {
|
||||
method: 'post',
|
||||
url: 'https://space.bilibili.com/ajax/member/GetInfo',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
@@ -34,7 +32,6 @@ module.exports = {
|
||||
method: 'get',
|
||||
url: `https://api.live.bilibili.com/room/v1/Room/room_init?id=${shortID}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://live.bilibili.com/${shortID}`,
|
||||
},
|
||||
});
|
||||
@@ -52,7 +49,6 @@ module.exports = {
|
||||
method: 'get',
|
||||
url: `https://api.live.bilibili.com/live_user/v1/UserInfo/get_anchor_in_room?roomid=${liveID}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://live.bilibili.com/${liveID}`,
|
||||
},
|
||||
});
|
||||
@@ -69,9 +65,6 @@ module.exports = {
|
||||
const nameResponse = await axios({
|
||||
method: 'get',
|
||||
url: `https://www.bilibili.com/video/av${aid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
responseType: 'arraybuffer',
|
||||
});
|
||||
const responseHtml = iconv.decode(nameResponse.data, 'UTF-8');
|
||||
@@ -91,7 +84,6 @@ module.exports = {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/space/fav/nav?mid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/#/favlist`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -11,7 +10,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://space.bilibili.com/ajax/member/getCoinVideos?mid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const JSONbig = require('json-bigint');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const uid = ctx.params.uid;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/space_history?host_uid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
transformResponse: [(data) => data],
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -10,7 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/v2/fav/video?vmid=${uid}&fid=${fid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -11,7 +10,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/relation/stat?vmid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
@@ -21,7 +19,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/relation/followers?vmid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -10,7 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/relation/stat?vmid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
@@ -20,7 +18,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/relation/followings?vmid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const product = ctx.params.product;
|
||||
@@ -22,7 +21,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.vc.bilibili.com/news/v1/notice/list?platform=pc&product=${product}&category=all&page_no=1&page_size=20`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://link.bilibili.com/p/eden/news',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const areaID = ctx.params.areaID;
|
||||
@@ -19,7 +18,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: 'https://api.live.bilibili.com/room/v1/Area/getList',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://link.bilibili.com/p/center/index',
|
||||
},
|
||||
});
|
||||
@@ -56,7 +54,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.live.bilibili.com/room/v1/area/getRoomList?area_id=${areaID}&sort_type=${order}&page_size=30&page_no=1`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://live.bilibili.com/p/eden/area-tags',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -15,7 +14,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.live.bilibili.com/room/v1/Room/get_info?room_id=${roomID}&from=room`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://live.bilibili.com/${roomID}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const key = ctx.params.key;
|
||||
@@ -21,7 +20,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://search.bilibili.com/api/search?search_type=live_room&keyword=${urlEncodedKey}&order=${order}&coverType=user_cover&page=1`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://search.bilibili.com/live?keyword=${urlEncodedKey}&order=${order}&coverType=user_cover&page=1&search_type=live`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://mall.bilibili.com/mall-c/search/category?keyword=&filters=&priceFlow=&priceCeil=&sortType=recommend&sortOrder=&pageIndex=1&state=&type=ip&id=${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://mall.bilibili.com/list.html?ip=${id}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://mall.bilibili.com/mall-c/home/calendar/list?page=new&startWeekNO=0&limitWeekSize=3',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://mall.bilibili.com/date.html?page=new',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const tid = ctx.params.tid;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/web-interface/newlist?ps=15&rid=${tid}&_=${+new Date()}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.bilibili.com/',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rid = ctx.params.rid || '0';
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/web-interface/ranking?jsonp=jsonp&rid=${rid}&day=${day}&type=1&arc_type=0&callback=__jp0`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.bilibili.com/ranking/all/${rid}/0/${day}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -10,7 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/v2/reply?type=1&oid=${aid}&sort=0`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.bilibili.com/video/av${aid}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const JSONbig = require('json-bigint');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const topic = ctx.params.topic;
|
||||
@@ -10,7 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.vc.bilibili.com/topic_svr/v1/topic_svr/topic_new?topic_name=${urlEncodedTopic}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.bilibili.com/tag/${urlEncodedTopic}/feed`,
|
||||
},
|
||||
transformResponse: [(data) => data],
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -13,7 +12,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: host,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -10,7 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://api.bilibili.com/x/v2/fav/video?vmid=${uid}&ps=30&tid=0&keyword=&pn=1&order=fav_time`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/#/favlist`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -10,7 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://space.bilibili.com/ajax/member/getSubmitVideos?mid=${uid}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://space.bilibili.com/${uid}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const iconv = require('iconv-lite');
|
||||
|
||||
const baseUrl = 'https://www.biquge5200.com/';
|
||||
@@ -12,7 +11,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `${baseUrl}${id}/`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Host: 'www.biquge5200.com',
|
||||
Referer: `${baseUrl}${id}/`,
|
||||
},
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const axios = require('../../utils/axios');
|
||||
|
||||
const axios_ins = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
module.exports = async (ctx) => {
|
||||
const url = `http://www.bjnews.com.cn/${ctx.params.cat}`;
|
||||
const res = await axios_ins.get(url);
|
||||
const res = await axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('#news_ul li');
|
||||
@@ -34,7 +28,7 @@ module.exports = async (ctx) => {
|
||||
guid: itemUrl,
|
||||
};
|
||||
out.push(single);
|
||||
proList.push(axios_ins.get(itemUrl));
|
||||
proList.push(axios.get(itemUrl));
|
||||
indexList.push(i);
|
||||
}
|
||||
const responses = await axios.all(proList);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const platform = ctx.params.platform;
|
||||
@@ -23,7 +22,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: APIUrl,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: webUrl,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const category = ctx.params.category;
|
||||
@@ -10,7 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const category = ctx.params.category;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const iconv = require('iconv-lite');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: 'https://www.dapenti.com/blog/blog.asp?name=xilei&subjectid=70',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.dapenti.com/blog/blog.asp?name=xilei&subjectid=70',
|
||||
},
|
||||
// 喷嚏网编码为GBK,需要转码
|
||||
@@ -30,7 +28,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
responseType: 'arraybuffer',
|
||||
|
||||
@@ -8,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://disqus.com/api/3.0/forums/listPosts.json?api_key=${config.disqus.api_key}&forum=${forum}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://disqus.com/',
|
||||
},
|
||||
});
|
||||
@@ -28,7 +27,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://disqus.com/api/3.0/forums/listThreads.json?api_key=${config.disqus.api_key}&forum=${forum}${threadsQuery}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://disqus.com/',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
function replaceEmpty(str) {
|
||||
return str.replace(' ', '');
|
||||
@@ -15,7 +14,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const _axios_client = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await _axios_client.get('http://www.dongqiudi.com/special/48');
|
||||
const response = await axios.get('http://www.dongqiudi.com/special/48');
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
@@ -35,7 +28,7 @@ module.exports = async (ctx) => {
|
||||
};
|
||||
|
||||
try {
|
||||
const es = _axios_client.get(itemUrl);
|
||||
const es = axios.get(itemUrl);
|
||||
proList.push(es);
|
||||
out.push(single);
|
||||
} catch (err) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `http://open.douyucdn.cn/api/RoomApi/room/${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.douyu.com/${id}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = {
|
||||
getData: async (name, url) => {
|
||||
@@ -8,7 +7,6 @@ module.exports = {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const company = ctx.params.company;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://www.kuaidi100.com/query?type=${company}&postid=${number}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.kuaidi100.com',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { imdb_id } = ctx.params;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://eztv.ag/api/get-torrents?imdb_id=${imdb_id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://eztv.ag',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -11,7 +10,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: APIUrl,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: webUrl,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const axios_ins = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
if (ctx.params.platform === 'desktop') {
|
||||
@@ -15,7 +8,7 @@ module.exports = async (ctx) => {
|
||||
if (ctx.params.platform === 'android-beta') {
|
||||
ctx.params.platform = 'android/beta';
|
||||
}
|
||||
const response = await axios_ins.get(`https://www.mozilla.org/en-US/firefox/${ctx.params.platform}/notes/`);
|
||||
const response = await axios.get(`https://www.mozilla.org/en-US/firefox/${ctx.params.platform}/notes/`);
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const sourceTimezoneOffset = -8;
|
||||
module.exports = async (ctx) => {
|
||||
@@ -9,9 +8,6 @@ module.exports = async (ctx) => {
|
||||
const res = await axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
let $ = cheerio.load(data);
|
||||
@@ -42,9 +38,6 @@ module.exports = async (ctx) => {
|
||||
itemRes = await axios({
|
||||
method: 'get',
|
||||
url: itemUrl,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
return Promise.resolve();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const column_id = ctx.params.cid;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'https://time.geekbang.org/serv/v1/column/intro',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://time.geekbang.org/',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
@@ -25,7 +23,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'https://time.geekbang.org/serv/v1/column/articles/latest',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://time.geekbang.org/',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
|
||||
@@ -12,9 +12,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
params: {
|
||||
sort: 'created',
|
||||
access_token: config.github.access_token,
|
||||
|
||||
@@ -7,9 +7,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: `https://api.github.com/users/${user}/repos`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
params: {
|
||||
sort: 'created',
|
||||
access_token: config.github.access_token,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const since = ctx.params.since;
|
||||
@@ -11,7 +10,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -20,9 +19,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const language = ctx.params.language === 'all' ? 'zh-CN' : ctx.params.language;
|
||||
@@ -15,9 +14,6 @@ module.exports = async (ctx) => {
|
||||
filter_locale: filter_locale,
|
||||
sort: 'updated',
|
||||
},
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
+2
-9
@@ -1,16 +1,9 @@
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const axios = require('../../utils/axios');
|
||||
|
||||
const axios_ins = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = `http://${ctx.params.url}`;
|
||||
const res = await axios_ins.get(`${url}/archives`);
|
||||
const res = await axios.get(`${url}/archives`);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
@@ -34,7 +27,7 @@ module.exports = async (ctx) => {
|
||||
if (value) {
|
||||
item.description = value;
|
||||
} else {
|
||||
const storyDeatil = await axios_ins.get(item.link);
|
||||
const storyDeatil = await axios.get(item.link);
|
||||
const data = storyDeatil.data;
|
||||
const $ = cheerio.load(data);
|
||||
item.pubDate = $('time').attr('datetime');
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -14,9 +13,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
params: {
|
||||
pid: 'website',
|
||||
c: 'flexweb',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const baseUrl = 'https://art.icity.ly';
|
||||
|
||||
@@ -16,7 +15,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const baseUrl = 'http://www.infzm.com/contents/';
|
||||
|
||||
@@ -11,7 +10,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://www.instagram.com/${id}/`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.instagram.com/${id}/`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `http://www.iqiyi.com/${id}.html`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Host: 'www.iqiyi.com',
|
||||
Referer: `http://www.iqiyi.com/${id}.html`,
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const base64_decode = (i) => Buffer.from(i, 'base64').toString('binary');
|
||||
|
||||
@@ -15,7 +14,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `${baseUrl}${sub_model}/`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'http://jandan.net',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://www.jianshu.com/c/${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.jianshu.com/c/${id}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://www.jianshu.com',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.jianshu.com',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://www.jianshu.com/trending/monthly',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.jianshu.com/trending/monthly',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://www.jianshu.com/u/${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.jianshu.com/u/${id}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://www.jianshu.com/trending/weekly',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.jianshu.com/trending/weekly',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'https://app.jike.ruguoapp.com/1.0/messages/history',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://m.okjike.com/topics/${id}`,
|
||||
'App-Version': '4.1.0',
|
||||
},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'https://app.jike.ruguoapp.com/1.0/squarePosts/list',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://m.okjike.com/topics/${id}`,
|
||||
'App-Version': '4.1.0',
|
||||
},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'https://app.jike.ruguoapp.com/1.0/personalUpdate/single',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://web.okjike.com/user/${id}/post`,
|
||||
'App-Version': '4.1.0',
|
||||
platform: 'web',
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const keyword = ctx.params.keyword;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://www.toutiao.com/search_content/?offset=0&format=json&keyword=${encodeURIComponent(keyword)}&autoload=true&count=20&cur_tab=1&from=search_tab`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.toutiao.com/search/?keyword=${encodeURIComponent(keyword)}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const category = ctx.params.category;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: 'https://gold-tag-ms.juejin.im/v1/categories',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://juejin.im/welcome/${category}`,
|
||||
'X-Juejin-Client': '',
|
||||
'X-Juejin-Src': 'web',
|
||||
@@ -25,7 +23,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://timeline-merger-ms.juejin.im/v1/get_entry_by_timeline?src=web&limit=20&category=${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://juejin.im/welcome/${category}`,
|
||||
},
|
||||
});
|
||||
@@ -54,7 +51,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: item.originalUrl,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: item.originalUrl,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const keep_project_and_duration = (text) => {
|
||||
const project = text
|
||||
@@ -53,7 +52,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: requestUrl,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Host: 'show.gotokeep.com',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'http://www.xincheng.tv',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { period = '1d' } = ctx.params;
|
||||
@@ -10,9 +9,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
baseURL,
|
||||
url: '/post/popular_recent.json',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
params: {
|
||||
period,
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = ctx.params.type;
|
||||
@@ -13,9 +12,6 @@ module.exports = async (ctx) => {
|
||||
sid: id,
|
||||
tid: id,
|
||||
},
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
const baseApiUrl = 'http://pagelet.mafengwo.cn/note/pagelet/recommendNoteApi';
|
||||
const baseUrl = 'http://www.mafengwo.cn';
|
||||
@@ -27,7 +26,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseUrl = 'https://home.mi.com/app/shop/content?id=s8939d03918810635';
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: baseUrl,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data.match(/,gid:(\d*),src:"(.+?)"/g).map((item) => ({
|
||||
@@ -28,7 +24,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://home.mi.com/app/shop/jsonp?k=test&m=Product&a=GetDetail&p={%22gid%22:${item.gid}}&_=${+new Date()}&callback=Zepto1532846359142`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: baseUrl,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'http://www.mihoyo.com/news/getNotice';
|
||||
@@ -17,7 +16,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'https://www.bh3.com/index.php/news/_more';
|
||||
@@ -19,7 +18,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
const cacheLength = 5;
|
||||
const cacheDays = 30;
|
||||
@@ -14,9 +13,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
baseURL: 'http://update.miui.com',
|
||||
url: '/updates/miota-fullrom.php',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
params: {
|
||||
d: device,
|
||||
b: releaseType,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
let category = ctx.params.category;
|
||||
@@ -13,7 +12,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -11,7 +10,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
let tag = ctx.params.tag;
|
||||
@@ -12,7 +11,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'http://www.mzitu.com/zhuanti';
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url');
|
||||
|
||||
const _axios_client = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const host = 'http://www.namoc.org/xwzx/tzgg/2017gonggao/';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await _axios_client.get(host);
|
||||
const response = await axios.get(host);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
@@ -36,7 +29,7 @@ module.exports = async (ctx) => {
|
||||
};
|
||||
|
||||
try {
|
||||
const es = _axios_client.get(itemUrl);
|
||||
const es = axios.get(itemUrl);
|
||||
proList.push(es);
|
||||
out.push(single);
|
||||
} catch (err) {
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url');
|
||||
|
||||
const _axios_client = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const host = 'http://www.namoc.org/zsjs/zlzx/';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await _axios_client.get(host);
|
||||
const response = await axios.get(host);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
@@ -36,7 +29,7 @@ module.exports = async (ctx) => {
|
||||
};
|
||||
|
||||
try {
|
||||
const es = _axios_client.get(itemUrl);
|
||||
const es = axios.get(itemUrl);
|
||||
proList.push(es);
|
||||
out.push(single);
|
||||
} catch (err) {
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url');
|
||||
|
||||
const _axios_client = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const host = 'http://www.namoc.org/xwzx/mtry/2018/';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await _axios_client.get(host);
|
||||
const response = await axios.get(host);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
@@ -36,7 +29,7 @@ module.exports = async (ctx) => {
|
||||
};
|
||||
|
||||
try {
|
||||
const es = _axios_client.get(itemUrl);
|
||||
const es = axios.get(itemUrl);
|
||||
proList.push(es);
|
||||
out.push(single);
|
||||
} catch (err) {
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url');
|
||||
|
||||
const _axios_client = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const host = 'http://www.namoc.org/xwzx/xw/xinwen/';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await _axios_client.get(host);
|
||||
const response = await axios.get(host);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
@@ -36,7 +29,7 @@ module.exports = async (ctx) => {
|
||||
};
|
||||
|
||||
try {
|
||||
const es = _axios_client.get(itemUrl);
|
||||
const es = axios.get(itemUrl);
|
||||
proList.push(es);
|
||||
out.push(single);
|
||||
} catch (err) {
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const _axios_client = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const host = 'http://www.namoc.org/xwzx/jdzt/2018zhuanti/';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await _axios_client.get(host);
|
||||
const response = await axios.get(host);
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
|
||||
+2
-10
@@ -1,18 +1,10 @@
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const axios = require('../../utils/axios');
|
||||
|
||||
const axios_ins = axios.create({
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Reference: 'https://www.natgeomedia.com',
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = `${ctx.params.type ? ctx.params.type : ''}`;
|
||||
const url = `https://www.natgeomedia.com/category/${ctx.params.cat}/${type}`;
|
||||
const res = await axios_ins.get(url);
|
||||
const res = await axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
@@ -37,7 +29,7 @@ module.exports = async (ctx) => {
|
||||
if (value) {
|
||||
item.description = value;
|
||||
} else {
|
||||
const storyDetail = await axios_ins.get(item.link);
|
||||
const storyDetail = await axios.get(item.link);
|
||||
const data = storyDetail.data;
|
||||
const $ = cheerio.load(data);
|
||||
item.description = $('.td-post-content').html();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `https://music.163.com/api/artist/albums/${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://music.163.com/',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const qs = require('querystring');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'http://music.163.com/api/dj/program/byradio',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://music.163.com/',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const qs = require('querystring');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'https://music.163.com/api/v3/playlist/detail',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://music.163.com/',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const qs = require('querystring');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const uid = ctx.params.uid;
|
||||
@@ -9,7 +8,6 @@ module.exports = async (ctx) => {
|
||||
method: 'post',
|
||||
url: 'http://music.163.com/api/user/playlist',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://music.163.com/',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'http://wufazhuce.com/',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'http://wufazhuce.com/',
|
||||
},
|
||||
});
|
||||
@@ -39,7 +37,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'http://wufazhuce.com/',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const res = await axios({
|
||||
method: 'get',
|
||||
url: 'https://www.oschina.net/news/',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://www.oschina.net/news/',
|
||||
},
|
||||
});
|
||||
@@ -39,7 +37,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: item.link,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: item.link,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: `http://www.panda.tv/api_room?roomid=${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://www.panda.tv/${id}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const config = require('../../config');
|
||||
const cheerio = require('cheerio');
|
||||
const axios = require('../../utils/axios');
|
||||
|
||||
@@ -8,7 +7,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: base_url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: base_url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const host = 'http://eecs.pku.edu.cn/';
|
||||
@@ -14,7 +13,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: host + 'Survey/Notice/?Mtitle=' + type,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: host,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const url = 'https://cloud.tencent.com/document/product/454/7878';
|
||||
@@ -8,9 +7,6 @@ module.exports = async (ctx) => {
|
||||
const res = await axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
@@ -8,9 +7,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: `https://book.qidian.com/info/${id}#Catalog`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
@@ -22,9 +18,6 @@ module.exports = async (ctx) => {
|
||||
const chapters_response = await axios({
|
||||
method: 'get',
|
||||
url: `https://book.qidian.com/ajax/book/category?${csrfToken}&bookId=${id}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
const chapter_item = [];
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
const parseDate = require('../../utils/date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
@@ -12,7 +11,6 @@ module.exports = async (ctx) => {
|
||||
method: 'get',
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: `https://book.qidian.com/info/${id}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const category = ctx.params.category;
|
||||
@@ -25,9 +24,6 @@ module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: `https://api.readhub.me/${category}`,
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
const axios = require('../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
const config = require('../../config');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://github.com/DIYgod/RSSHub/releases.atom',
|
||||
headers: {
|
||||
'User-Agent': config.ua,
|
||||
Referer: 'https://github.com/DIYgod/RSSHub',
|
||||
},
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user