feat: recover microsoft edge update
This commit is contained in:
parent
d3a8747711
commit
7a8335ee1e
|
|
@ -985,9 +985,6 @@ router.get('/xinwenlianbo/index', lazyloadRouteHandler('./routes/xinwenlianbo/in
|
|||
// invisionapp
|
||||
router.get('/invisionapp/inside-design', lazyloadRouteHandler('./routes/invisionapp/inside-design'));
|
||||
|
||||
// Chrome 网上应用店
|
||||
router.get('/chrome/webstore/extensions/:id', lazyloadRouteHandler('./routes/chrome/extensions'));
|
||||
|
||||
// RTHK
|
||||
router.get('/rthk-news/:lang/:category', lazyloadRouteHandler('./routes/rthk-news/index'));
|
||||
|
||||
|
|
@ -1148,9 +1145,6 @@ router.get('/ptpress/book/:type?', lazyloadRouteHandler('./routes/ptpress/book')
|
|||
// unit-image
|
||||
router.get('/unit-image/films/:type?', lazyloadRouteHandler('./routes/unit-image/films'));
|
||||
|
||||
// Microsoft Edge
|
||||
router.get('/edge/addon/:crxid', lazyloadRouteHandler('./routes/edge/addon'));
|
||||
|
||||
// Microsoft Store
|
||||
router.get('/microsoft-store/updates/:productid/:market?', lazyloadRouteHandler('./routes/microsoft-store/updates'));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
const got = require('@/utils/got');
|
||||
import got from '@/utils/got';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const crxid = ctx.params.crxid;
|
||||
export default async (ctx) => {
|
||||
const crxid = ctx.req.param('crxid');
|
||||
|
||||
const page_url = `https://microsoftedge.microsoft.com/addons/detail/${crxid}`;
|
||||
|
||||
const { data } = await got({
|
||||
method: 'get',
|
||||
url: `https://microsoftedge.microsoft.com/addons/getproductdetailsbycrxid/${crxid}?hl=zh-CN&gl=CN`,
|
||||
url: `https://microsoftedge.microsoft.com/addons/getproductdetailsbycrxid/${crxid}?hl=en`,
|
||||
headers: {
|
||||
Referer: page_url,
|
||||
},
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
ctx.set('data', {
|
||||
title: `${data.name} - Microsoft Edge Addons`,
|
||||
description: data.shortDescription,
|
||||
image: `https:${data.thumbnail}`,
|
||||
|
|
@ -28,5 +28,5 @@ module.exports = async (ctx) => {
|
|||
link: page_url,
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export default {
|
||||
'/edge/addon/:crxid': ['hoilc', 'DIYgod'],
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
export default {
|
||||
'microsoft.com': {
|
||||
_name: 'Microsoft',
|
||||
microsoftedge: [
|
||||
{
|
||||
title: 'Addon Update',
|
||||
source: '/addons/detail/:name/:crxid',
|
||||
docs: 'https://docs.rsshub.app/routes/program-update#microsoft-edge',
|
||||
target: '/microsoft/edge/addon/:crxid',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export default (router) => {
|
||||
router.get('/edge/addon/:crxid', './addon');
|
||||
};
|
||||
|
|
@ -364,7 +364,7 @@ Logseq 开发团队已经放弃了 [旧网站](https://logseq.com/blog)。
|
|||
|
||||
### Addons Update {#microsoft-edge-addons-update}
|
||||
|
||||
<Route author="hoilc" example="/edge/addon/gangkeiaobmjcjokiofpkfpcobpbmnln" path="/edge/addon/:crxid" paramsDesc={['Addon id, can be found in addon url']} />
|
||||
<Route author="hoilc DIYgod" example="/microsoft/edge/addon/gangkeiaobmjcjokiofpkfpcobpbmnln" path="/microsoft/edge/addon/:crxid" paramsDesc={['Addon id, can be found in addon url']} />
|
||||
|
||||
## Microsoft Store {#microsoft-store}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue