From ab24f40d7a255399791f6dfd3355ec6911250940 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 23 Jun 2023 08:03:30 +0000
Subject: [PATCH] style: auto format
---
docs/traditional-media.md | 19 +++++++------
lib/v2/radiofrance/geopolitique.js | 43 +++++++++++++++---------------
lib/v2/radiofrance/maintainer.js | 2 +-
lib/v2/radiofrance/radar.js | 22 +++++++--------
lib/v2/radiofrance/router.js | 2 +-
5 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/docs/traditional-media.md b/docs/traditional-media.md
index 49e9858d6..6aa2b93b4 100644
--- a/docs/traditional-media.md
+++ b/docs/traditional-media.md
@@ -992,6 +992,15 @@ IT・科学 tech_science
+## 法国广播电台
+
+### 地缘政治栏目
+
+
+
+法广电台地缘政治栏目最新 3 篇文章全文抓取,提供比官方源更佳的阅读体验。
+
+
## 公視新聞網
### 即時新聞
@@ -2706,13 +2715,3 @@ category 对应的关键词有
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
-
-## 法国广播电台
-
-### 地缘政治栏目
-
-
-
-法广电台地缘政治栏目最新3篇文章全文抓取,提供比官方源更佳的阅读体验。
-
-
\ No newline at end of file
diff --git a/lib/v2/radiofrance/geopolitique.js b/lib/v2/radiofrance/geopolitique.js
index dd01987d5..50e0c8740 100644
--- a/lib/v2/radiofrance/geopolitique.js
+++ b/lib/v2/radiofrance/geopolitique.js
@@ -4,29 +4,30 @@ const parser = require('@/utils/rss-parser');
const { art } = require('@/utils/render');
module.exports = async (ctx) => {
- const feed = await parser.parseURL('https://radiofrance-podcast.net/podcast09/rss_10009.xml');
+ const feed = await parser.parseURL('https://radiofrance-podcast.net/podcast09/rss_10009.xml');
- const items = await Promise.all(
- // only retrieve the full text for the first 3 items
- feed.items.slice(0, 3)
- .map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const uri = item.link.slice(item.link.indexOf('/franceinter'));
- const apiurl = 'https://www.radiofrance.fr/api/v2.1/path?value=' + encodeURIComponent(uri);
- const { data } = await got(apiurl);
+ const items = await Promise.all(
+ // only retrieve the full text for the first 3 items
+ feed.items.slice(0, 3).map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const uri = item.link.slice(item.link.indexOf('/franceinter'));
+ const apiurl = 'https://www.radiofrance.fr/api/v2.1/path?value=' + encodeURIComponent(uri);
+ const { data } = await got(apiurl);
- delete item.content;
- delete item.contentSnippet;
+ delete item.content;
+ delete item.contentSnippet;
- item.description = art(path.join(__dirname, 'templates/article.art'), data.content);
- return item;
- })));
+ item.description = art(path.join(__dirname, 'templates/article.art'), data.content);
+ return item;
+ })
+ )
+ );
- ctx.state.data = {
- title: feed.title,
- link: feed.link,
- description: feed.description,
- item: items,
- language: feed.language,
- };
+ ctx.state.data = {
+ title: feed.title,
+ link: feed.link,
+ description: feed.description,
+ item: items,
+ language: feed.language,
+ };
};
diff --git a/lib/v2/radiofrance/maintainer.js b/lib/v2/radiofrance/maintainer.js
index e4940a016..0abbe714b 100644
--- a/lib/v2/radiofrance/maintainer.js
+++ b/lib/v2/radiofrance/maintainer.js
@@ -1,3 +1,3 @@
module.exports = {
- '/geopolitique': ['xdu'],
+ '/geopolitique': ['xdu'],
};
diff --git a/lib/v2/radiofrance/radar.js b/lib/v2/radiofrance/radar.js
index 952ffea4e..47b02b454 100644
--- a/lib/v2/radiofrance/radar.js
+++ b/lib/v2/radiofrance/radar.js
@@ -1,13 +1,13 @@
module.exports = {
- 'radiofrance.fr': {
- _name: 'Radio France',
- 'www': [
- {
- title: 'Géopolitique',
- docs: 'https://docs.rsshub.app/traditional-media.html#fa-guo-guang-bo-dian-tai',
- source: ['/franceinter/podcasts/geopolitique', '/'],
- target: '/radiofrance/geopolitique',
- },
- ],
- },
+ 'radiofrance.fr': {
+ _name: 'Radio France',
+ www: [
+ {
+ title: 'Géopolitique',
+ docs: 'https://docs.rsshub.app/traditional-media.html#fa-guo-guang-bo-dian-tai',
+ source: ['/franceinter/podcasts/geopolitique', '/'],
+ target: '/radiofrance/geopolitique',
+ },
+ ],
+ },
};
diff --git a/lib/v2/radiofrance/router.js b/lib/v2/radiofrance/router.js
index 6e5b7e376..55bcc3994 100644
--- a/lib/v2/radiofrance/router.js
+++ b/lib/v2/radiofrance/router.js
@@ -1,3 +1,3 @@
module.exports = (router) => {
- router.get('/geopolitique', require('./geopolitique'));
+ router.get('/geopolitique', require('./geopolitique'));
};