mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 23:34:38 +08:00
feat: twitter following timeline
This commit is contained in:
@@ -2,7 +2,7 @@ const URL = require('url');
|
||||
const config = require('@/config');
|
||||
const Twit = require('twit');
|
||||
|
||||
const ProcessFeed = ({ data = [] }) => {
|
||||
const ProcessFeed = ({ data = [] }, showAuthor = false) => {
|
||||
const getQueryParams = (url) => URL.parse(url, true).query;
|
||||
const getOrigionImg = (url) => {
|
||||
// https://greasyfork.org/zh-CN/scripts/2312-resize-image-on-open-image-in-new-tab/code#n150
|
||||
@@ -100,8 +100,10 @@ const ProcessFeed = ({ data = [] }) => {
|
||||
}
|
||||
|
||||
return {
|
||||
title: `${item.in_reply_to_screen_name ? 'Re ' : ''}${formatText(item.full_text)}`,
|
||||
description: `${item.in_reply_to_screen_name ? 'Re ' : ''}${formatText(item.full_text)}${url}${img}${quote}`,
|
||||
title: `${showAuthor ? item.user.name + ': ' : ''}${item.in_reply_to_screen_name ? 'Re ' : ''}${formatText(item.full_text)}`,
|
||||
description: `${showAuthor ? `<img width="15px" referrerpolicy="no-referrer" src="${item.user.profile_image_url_https}"><strong>${item.user.name}:</strong><br><br>` : ''}${
|
||||
item.in_reply_to_screen_name ? 'Re ' : ''
|
||||
}${formatText(item.full_text)}${url}${img}${quote}`,
|
||||
pubDate: new Date(item.created_at).toUTCString(),
|
||||
link: `https://twitter.com/${item.user.screen_name}/status/${item.id_str}`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user