diff --git a/docs/en/other.md b/docs/en/other.md
index 18067718bb25a4..d97c7c5d1f5d70 100644
--- a/docs/en/other.md
+++ b/docs/en/other.md
@@ -220,3 +220,9 @@ Type
| all | rec |
+
+## Fisher Spb
+
+### News
+
+
${$('.news-message-text', element).html()}
`).root(); + $('.news-message-media a', element).each((_, elem) => { + if ($(elem).hasClass('news-message-youtube')) { + content.append(renderVideo($(elem).attr('data-youtube'))); + } else { + content.append(renderImage($(elem).attr('href'))); + } + }); + return content; + }; + + const items = $('.news-message') + .map((_, elem) => ({ + pubDate: parseDate($('.news-message-date', elem).text().trim(), 'DD.MM.YYYY HH:mm'), + title: $('.news-message-location', elem).text().trim(), + description: descBuilder(elem).html(), + author: $('.news-message-user', elem).text().trim(), + guid: $(elem).attr('id'), + link: rootUrl + $('.news-message-comments-number > a', elem).attr('href') + })) + .get(); + + ctx.state.data = { + title: $('head > title').text().trim(), + link: rootUrl, + item: items + }; +}; diff --git a/lib/v2/fisher-spb/radar.js b/lib/v2/fisher-spb/radar.js new file mode 100644 index 00000000000000..581c10efd1b788 --- /dev/null +++ b/lib/v2/fisher-spb/radar.js @@ -0,0 +1,13 @@ +module.exports = { + 'fisher.spb.ru': { + _name: 'fisher spb', + '.': [ + { + title: 'news', + docs: 'https://docs.rsshub.app/en/other.html#fisher-spb', + source: ['/news'], + target: '/fisher-spb/news', + }, + ], + }, +}; diff --git a/lib/v2/fisher-spb/router.js b/lib/v2/fisher-spb/router.js new file mode 100644 index 00000000000000..69a5972f6a8112 --- /dev/null +++ b/lib/v2/fisher-spb/router.js @@ -0,0 +1,3 @@ +module.exports = function (router) { + router.get('/news', require('./news')); +}; diff --git a/lib/v2/fisher-spb/templates/image.art b/lib/v2/fisher-spb/templates/image.art new file mode 100644 index 00000000000000..de65644dbd264f --- /dev/null +++ b/lib/v2/fisher-spb/templates/image.art @@ -0,0 +1 @@ +