Skip to content

Commit

Permalink
Merge pull request #840 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 25, 2023
2 parents 360f23e + 7505eb6 commit 5017372
Show file tree
Hide file tree
Showing 25 changed files with 472 additions and 232 deletions.
7 changes: 4 additions & 3 deletions docs/en/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,10 @@ See docs of the specified route and `lib/config.js` for detailed information.
- Instagram:
- `IG_USERNAME`: Your Instagram username
- `IG_PASSWORD`: Your Instagram password
- `IG_PROXY`: Proxy URL for Instagram
- `IG_USERNAME`: Your Instagram username (Private API only)
- `IG_PASSWORD`: Your Instagram password (Private API only)
- `IG_PROXY`: Proxy URL for Instagram (Private API only, optional)
- `IG_COOKIE`: Your Instagram cookie (Cookie only)
Warning: Two Factor Authentication is **not** supported.
Expand Down
6 changes: 3 additions & 3 deletions docs/en/program-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ pageClass: routes

<RouteEn author="nczitzk" example="/anytxt/release-notes" path="/anytxt/release-notes"/>

## Apkpure
## APKPure

### Versions

<RouteEn author="maple3142" example="/apkpure/versions/jp/jp.co.craftegg.band" path="/apkpure/versions/:region/:pkg" :paramsDesc="['Region code', 'package name']"/>
<RouteEn author="maple3142" example="/apkpure/versions/jp.co.craftegg.band/jp" path="/apkpure/versions/:pkg/:region?" :paramsDesc="['Package name', 'Region code, `en` by default']" radar="1" anticrawler="1" puppeteer="1"/>

## App Center

Expand Down Expand Up @@ -116,7 +116,7 @@ Language

### BlueStacks 5 Release Notes

<RouteEn author="TonyRL" example="/bluestacks/release/5" path="/bluestacks/release/5" radar="1" puppeteer="1"/>
<RouteEn author="TonyRL" example="/bluestacks/release/5" path="/bluestacks/release/5" radar="1" anticrawler="1" puppeteer="1"/>

## Brave

Expand Down
12 changes: 8 additions & 4 deletions docs/en/social-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ Type

::: warning

Due to Instagram API restrictions, you have to setup your credentials on the server. See deployment guide for more.
Due to Instagram Private API restrictions, you have to setup your credentials on the server. 2FA is not supported. See [deployment guide](https://docs.rsshub.app/en/install/) for more.

If you don't want to setup credentials, use Picuki.
If you don't want to setup credentials, you can use [Picuki](#picuki).

:::

### User Profile / Hashtag
### User Profile / Hashtag - Private API

<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">
<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" selfhost="1">

| User timeline | Hashtag |
| ---------- | ---- |
Expand All @@ -168,6 +168,10 @@ It's highly recommended to deploy with Redis cache enabled.

</RouteEn>

### User Profile / Hashtag - Cookie

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

## Lofter

### User
Expand Down
7 changes: 4 additions & 3 deletions docs/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,10 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行

- Instagram:

- `IG_USERNAME`: Instagram 用户名。
- `IG_PASSWORD`: Instagram 密码。
- `IG_PROXY`: Instagram 代理 URL。
- `IG_USERNAME`: Instagram 用户名(仅 Private API)
- `IG_PASSWORD`: Instagram 密码(仅 Private API)
- `IG_PROXY`: Instagram 代理 URL(仅 Private API,可选)
- `IG_COOKIE`: Instagram 登录后的 Cookie(仅 Cookie)

注意,暂**不支持**两步验证。

Expand Down
14 changes: 7 additions & 7 deletions docs/multimedia.md
Original file line number Diff line number Diff line change
Expand Up @@ -1561,19 +1561,19 @@ JavDB 有多个备用域名,本路由默认使用永久域名 <https://javdb.c

### 分区帖子

<Route author="qiwihui junfengP nczitzk" example="/dsndsht23/36/368" path="/dsndsht23/:subforumid?/:type?" supportBT="1" :paramsDesc="['版块 id 或板块名称(见下表), 为空默认高清中文字幕', '类型 id, 可在分区类型过滤后的 URL 中找到']">
<Route author="qiwihui junfengP nczitzk" example="/sehuatang/36/368" path="/sehuatang/:subforumid?/:type?" supportBT="1" :paramsDesc="['版块 id 或板块名称(见下表), 为空默认高清中文字幕', '类型 id, 可在分区类型过滤后的 URL 中找到']">

**原创 BT 电影**

| 每日合集 | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | 亚洲名站有码 | VR 系列 | 欧美无码 | 动漫原创 | AI 换脸电影 | 原档收藏 WMV | 综合讨论区 |
| ---- | ---- | ------ | ------ | ------ | ---- | ------ | ----- | ---- | ---- | ------- | -------- | ----- |
| mrhj | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | yzmzym | vr | omwm | dmyc | ai | ydsc | zhtlq |
| 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 |
| ---- | ------ | ------ | ------ | ---- | ----- | ---- | ---- | ---- | ---- | ---- |
| gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl |

**色花图片**

| 华人性爱自拍 | 华人街拍区 | 亚洲性爱 | 欧美性爱 | 卡通动漫 |
| ------ | ----- | ---- | ---- | ---- |
| hrxazp | hrjpq | yzxa | omxa | ktdm |
| 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |

</Route>

Expand Down
8 changes: 4 additions & 4 deletions docs/program-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ pageClass: routes

<Route author="nczitzk" example="/anytxt/release-notes" path="/anytxt/release-notes"/>

## Apkpure
## APKPure

### Versions
### 所有版本

<Route author="maple3142" example="/apkpure/versions/jp/jp.co.craftegg.band" path="/apkpure/versions/:region/:pkg" :paramsDesc="['區域代號', 'package name']"/>
<Route author="maple3142" example="/apkpure/versions/jp.co.craftegg.band/jp" path="/apkpure/versions/:pkg/:region?" :paramsDesc="['包名稱', '區域代號,預設為 `en`']" radar="1" anticrawler="1" puppeteer="1"/>

## App Center

Expand Down Expand Up @@ -114,7 +114,7 @@ pageClass: routes

### BlueStacks 5 版本日誌

<Route author="TonyRL" example="/bluestacks/release/5" path="/bluestacks/release/5" radar="1" puppeteer="1"/>
<Route author="TonyRL" example="/bluestacks/release/5" path="/bluestacks/release/5" radar="1" anticrawler="1" puppeteer="1"/>

## Brave

Expand Down
10 changes: 7 additions & 3 deletions docs/social-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,13 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性

::: warning 注意

由于 Instagram API 限制,必须在服务器上设置你的用户名和密码。暂不支持两步验证。步骤见部署指南
由于 Instagram Private API 限制,必须在服务器上设置你的用户名和密码。暂不支持两步验证。步骤见[部署指南](https://docs.rsshub.app/install/)

如需无登录的 feed,请用 Picuki。
如需无登录的 feed,请用 [Picuki](#picuki)

:::

### 用户 / 标签
### 用户 / 标签 - Private API

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

Expand All @@ -508,6 +508,10 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性

</Route>

### 用户 / 标签 - Cookie

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

## Keep

### 运动日记
Expand Down
1 change: 1 addition & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ const calculateValue = () => {
username: envs.IG_USERNAME,
password: envs.IG_PASSWORD,
proxy: envs.IG_PROXY,
cookie: envs.IG_COOKIE,
},
iwara: {
cookie: envs.IWARA_COOKIE,
Expand Down
2 changes: 1 addition & 1 deletion lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ router.get('/anigamer/new_anime', lazyloadRouteHandler('./routes/anigamer/new_an
router.get('/anigamer/anime/:sn', lazyloadRouteHandler('./routes/anigamer/anime'));

// Apkpure
router.get('/apkpure/versions/:region/:pkg', lazyloadRouteHandler('./routes/apkpure/versions'));
// router.get('/apkpure/versions/:region/:pkg', lazyloadRouteHandler('./routes/apkpure/versions'));

// 豆瓣美女 migrated to v2
// router.get('/dbmv/:category?', lazyloadRouteHandler('./routes/dbmv/index'));
Expand Down
23 changes: 0 additions & 23 deletions lib/routes/apkpure/versions.js

This file was deleted.

3 changes: 3 additions & 0 deletions lib/v2/apkpure/maintainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'/versions/:pkg/:region?': ['maple3142'],
};
13 changes: 13 additions & 0 deletions lib/v2/apkpure/radar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
'apkpure.com': {
_name: 'APKPure',
'.': [
{
title: '所有版本',
docs: 'https://docs.rsshub.app/program-update.html#apkpure',
source: ['/:region/:stuff/:pkg/versions', '/:stuff/:pkg/versions', '/:stuff/:pkg'],
target: (params) => `/apkpure/versions/${params.pkg}${params.region ? `/${params.region}` : ''}`,
},
],
},
};
3 changes: 3 additions & 0 deletions lib/v2/apkpure/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = (router) => {
router.get('/versions/:pkg/:region?', require('./versions'));
};
48 changes: 48 additions & 0 deletions lib/v2/apkpure/versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const cheerio = require('cheerio');
const logger = require('@/utils/logger');
const { parseDate } = require('@/utils/parse-date');

module.exports = async (ctx) => {
const { pkg, region = 'en' } = ctx.params;
const baseUrl = 'https://apkpure.com';
const link = `${baseUrl}/${region}/${pkg}/versions`;

const browser = await require('@/utils/puppeteer')();
const page = await browser.newPage();
await page.setRequestInterception(true);
page.on('request', (request) => {
request.resourceType() === 'document' ? request.continue() : request.abort();
});
logger.debug(`Requesting ${link}`);
await page.goto(link, {
waitUntil: 'domcontentloaded',
});

const r = await page.evaluate(() => document.documentElement.innerHTML);
browser.close();

const $ = cheerio.load(r);
const img = new URL($('.ver-top img').attr('src'));
img.searchParams.delete('w'); // get full resolution icon

const items = $('.ver li')
.toArray()
.map((ver) => {
ver = $(ver);
return {
title: ver.find('.ver-item-n').text(),
description: ver.html(),
link: `${baseUrl}${ver.find('a').attr('href')}`,
pubDate: parseDate(ver.find('.update-on').text().replace(/年|月/g, '-').replace('日', '')),
};
});

ctx.state.data = {
title: $('.ver-top-h1').text(),
description: $('.ver-top-title p').text(),
image: img.href,
language: region ? region : 'en',
link,
item: items,
};
};
121 changes: 0 additions & 121 deletions lib/v2/dsndsht23/index.js

This file was deleted.

Loading

1 comment on commit 5017372

@vercel
Copy link

@vercel vercel bot commented on 5017372 Feb 25, 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.