Skip to content

Commit

Permalink
Merge pull request #839 from DIYgod/master
Browse files Browse the repository at this point in the history
[pull] master from diygod:master
  • Loading branch information
pull[bot] authored Feb 24, 2023
2 parents 7df964c + a7cbbf5 commit 360f23e
Show file tree
Hide file tree
Showing 20 changed files with 320 additions and 250 deletions.
15 changes: 0 additions & 15 deletions assets/radar-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,21 +592,6 @@
],
},
'eventernote.com': { _name: 'Eventernote', www: [{ title: '声优活动及演唱会', docs: 'https://docs.rsshub.app/anime.html#eventernote', source: '/actors/:name/:id/events', target: '/eventernote/actors/:name/:id' }] },
'instagram.com': {
_name: 'Instagram',
www: [
{
title: '用户',
docs: 'https://docs.rsshub.app/social-media.html#instagram',
source: '/:id',
target: (params) => {
if (params.id !== 'explore' && params.id !== 'developer') {
return '/instagram/user/:id';
}
},
},
],
},
'huya.com': { _name: '虎牙直播', '.': [{ title: '直播间开播', docs: 'https://docs.rsshub.app/live.html#hu-ya-zhi-bo-zhi-bo-jian-kai-bo', source: '/:id', target: '/huya/live/:id' }] },
'craigslist.org': { _name: 'Craigslist', '.': [{ title: '商品搜索列表', docs: 'https://docs.rsshub.app/shopping.html#craigslist' }] },
'scboy.com': {
Expand Down
14 changes: 12 additions & 2 deletions docs/en/social-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,19 @@ If you don't want to setup credentials, use Picuki.

:::

### User Profile
### User Profile / Hashtag

<RouteEn author="oppilate DIYgod" example="/instagram/user/stefaniejoosten" path="/instagram/:category/:key" :paramsDesc="['Feed category, see table below','Username / Hashtag name']" radar="1" anticrawler="1">

| User timeline | Hashtag |
| ---------- | ---- |
| user | tags |

<RouteEn author="oppilate DIYgod" example="/instagram/user/stefaniejoosten" path="/instagram/:category/:key" :paramsDesc="['Feed category. Only user category is supported for now.','Key for such category. E.g. username/ID for user feed']" radar="1" anticrawler="1"/>
::: tip Tips
It's highly recommended to deploy with Redis cache enabled.
:::

</RouteEn>

## Lofter

Expand Down
18 changes: 14 additions & 4 deletions docs/social-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,19 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性

:::

### 用户
### 用户 / 标签

<Route author="oppilate DIYgod" example="/instagram/user/stefaniejoosten" path="/instagram/:category/:key" :paramsDesc="['类别,见下表', '用户名/标签名']" radar="1" anticrawler="1" radar="1">

<Route author="oppilate DIYgod" example="/instagram/user/stefaniejoosten" path="/instagram/:category/:key" :paramsDesc="['时间线类别,目前仅支持用户时间线','针对该类别的索引,例如用户时间线里是用户名或用户 ID']" radar="1" anticrawler="1"/>
| 用户时间线 | 标签 |
| ----- | ---- |
| user | tags |

::: tip Tips
建议在部署时使用 Redis 缓存。
:::

</Route>

## Keep

Expand Down Expand Up @@ -1497,9 +1507,9 @@ rule

<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/notes" path="/xiaohongshu/user/:user_id/notes" :paramsDesc="['用户 ID']" puppeteer="1" anticrawler="1" radar="1" rssbud="1"/>

### 用户专辑
### 用户收藏

<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/album" path="/xiaohongshu/user/:user_id/album" :paramsDesc="['用户 ID']" puppeteer="1" anticrawler="1" radar="1" rssbud="1"/>
<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/collect" path="/xiaohongshu/user/:user_id/collect" :paramsDesc="['用户 ID']" puppeteer="1" anticrawler="1" radar="1" rssbud="1"/>

### 专辑

Expand Down
15 changes: 0 additions & 15 deletions lib/radar-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -1283,21 +1283,6 @@ module.exports = {
},
],
},
'instagram.com': {
_name: 'Instagram',
www: [
{
title: '用户',
docs: 'https://docs.rsshub.app/social-media.html#instagram',
source: '/:id',
target: (params) => {
if (params.id !== 'explore' && params.id !== 'developer') {
return '/instagram/user/:id';
}
},
},
],
},
'huya.com': {
_name: '虎牙直播',
'.': [
Expand Down
2 changes: 1 addition & 1 deletion lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -3362,7 +3362,7 @@ router.get('/mitbbs/:caty?', lazyloadRouteHandler('./routes/mitbbs/index'));
router.get('/jiazhen108', lazyloadRouteHandler('./routes/jiazhen108/index'));

// Instagram
router.get('/instagram/:category/:key', lazyloadRouteHandler('./routes/instagram/index'));
// router.get('/instagram/:category/:key', lazyloadRouteHandler('./routes/instagram/index'));

// 优设网
router.get('/uisdc/talk/:sort?', lazyloadRouteHandler('./routes/uisdc/talk'));
Expand Down
131 changes: 0 additions & 131 deletions lib/routes/instagram/index.js

This file was deleted.

28 changes: 0 additions & 28 deletions lib/routes/instagram/utils.js

This file was deleted.

3 changes: 3 additions & 0 deletions lib/v2/instagram/maintainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'/:category/:key': ['oppilate', 'DIYgod'],
};
Loading

1 comment on commit 360f23e

@vercel
Copy link

@vercel vercel bot commented on 360f23e Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.