diff --git a/lib/routes/freewechat/profile.ts b/lib/routes/freewechat/profile.ts
index 16f96fa8501bf7..515c06d686bfeb 100644
--- a/lib/routes/freewechat/profile.ts
+++ b/lib/routes/freewechat/profile.ts
@@ -65,7 +65,7 @@ async function handler(ctx) {
$('.js_img_placeholder').remove();
$('amp-img').each((_, e) => {
e = $(e);
- e.replaceWith(``);
+ e.replaceWith(``);
});
$('amp-video').each((_, e) => {
e = $(e);
diff --git a/lib/routes/gcores/category.ts b/lib/routes/gcores/category.ts
index 269a2a8d1a439d..ef1813025b58dd 100644
--- a/lib/routes/gcores/category.ts
+++ b/lib/routes/gcores/category.ts
@@ -77,9 +77,11 @@ async function handler(ctx) {
const itemPage = itemRes.data;
const $ = load(itemPage);
- let articleData = await got(`https://www.gcores.com/gapi/v1${item.url}?include=media`);
+ const articleRaw = await got(`https://www.gcores.com/gapi/v1${item.url}?include=media,category,user`);
+ const articleData = articleRaw.data.data;
+ const articleMeta = articleRaw.data.included.find((i) => i.type === 'users' && i.id === articleData.relationships.user.data.id);
+ const author = articleMeta.attributes.nickname;
- articleData = articleData.data.data;
let cover;
if (articleData.attributes.cover) {
cover = ``;
@@ -127,6 +129,7 @@ async function handler(ctx) {
description: cover + content,
link: articleUrl,
guid: articleUrl,
+ author,
pubDate: new Date(articleData.attributes['published-at']),
};
return category === 'news' ? basicItem : { ...basicItem, category: item.category };
diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts
index c64d1761630753..28ffd40f7c1292 100644
--- a/lib/routes/picnob/user.ts
+++ b/lib/routes/picnob/user.ts
@@ -13,18 +13,31 @@ import puppeteer from '@/utils/puppeteer';
export const route: Route = {
path: '/user/:id',
+ categories: ['social-media'],
+ example: '/picnob/user/xlisa_olivex',
+ parameters: { id: 'Instagram id' },
+ features: {
+ requireConfig: false,
+ requirePuppeteer: true,
+ antiCrawler: true,
+ supportBT: false,
+ supportPodcast: false,
+ supportScihub: false,
+ },
radar: [
{
source: ['picnob.com/profile/:id/*'],
+ target: '/user/:id',
},
],
- name: 'Unknown',
+ name: 'User Profile - Picnob',
maintainers: ['TonyRL', 'micheal-death'],
handler,
};
async function handler(ctx) {
- const baseUrl = 'https://www.picnob.com';
+ // NOTE: 'picnob' is still available, but all requests to 'picnob' will be redirected to 'pixwox' eventually
+ const baseUrl = 'https://www.pixwox.com';
const id = ctx.req.param('id');
const url = `${baseUrl}/profile/${id}/`;
@@ -40,8 +53,8 @@ async function handler(ctx) {
},
});
html = data;
- } catch (error) {
- if (error.message.includes('code 403')) {
+ } catch (error: any) {
+ if (error.message.includes('403')) {
html = await puppeteerGet(url, browser);
usePuppeteer = true;
}
@@ -84,7 +97,7 @@ async function handler(ctx) {
...new Set(
$('.post_slide a')
.toArray()
- .map((a) => {
+ .map((a: any) => {
a = $(a);
return {
ori: a.attr('href'),