mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
style: auto format
This commit is contained in:
@@ -872,7 +872,6 @@ Instagram Stories 没有可靠的 guid,你的 RSS 阅读器可能将同一条
|
||||
|
||||
<Route author="LarchLiu" example="/twitter/tweet/DIYgod/status/1650844643997646852" path="/twitter/tweet/:id/status/:status/:original?" :paramsDesc="['用户名', '推文 ID', '额外参数;返回数据类型,当非 `0`/`false` 且 `config.isPackage` 为 `true`时,返回 twitter 原始数据']" radar="1" rssbud="1"/>
|
||||
|
||||
|
||||
## Vimeo
|
||||
|
||||
### 用户页面
|
||||
|
||||
@@ -113,13 +113,18 @@ const timelineKeywords = (keywords, params = {}) =>
|
||||
|
||||
// https://github.com/mikf/gallery-dl/blob/a53cfc845e12d9e98fefd07e43ebffaec488c18f/gallery_dl/extractor/twitter.py#L795-L805
|
||||
const tweetDetail = (userId, params) =>
|
||||
paginationTweets('/graphql/ItejhtHVxU7ksltgMmyaLA/TweetDetail', userId, {
|
||||
...params,
|
||||
with_rux_injections: false,
|
||||
withCommunity: true,
|
||||
withQuickPromoteEligibilityTweetFields: false,
|
||||
withBirdwatchNotes: false,
|
||||
}, ["threaded_conversation_with_injections"]);
|
||||
paginationTweets(
|
||||
'/graphql/ItejhtHVxU7ksltgMmyaLA/TweetDetail',
|
||||
userId,
|
||||
{
|
||||
...params,
|
||||
with_rux_injections: false,
|
||||
withCommunity: true,
|
||||
withQuickPromoteEligibilityTweetFields: false,
|
||||
withBirdwatchNotes: false,
|
||||
},
|
||||
['threaded_conversation_with_injections']
|
||||
);
|
||||
|
||||
function gatherLegacyFromData(entries, filter = 'tweet-') {
|
||||
const tweets = [];
|
||||
@@ -128,14 +133,12 @@ function gatherLegacyFromData(entries, filter = 'tweet-') {
|
||||
const entryId = entry.entryId;
|
||||
if (entryId) {
|
||||
if (filter === 'none') {
|
||||
if (entryId.startsWith("tweet-")) {
|
||||
if (entryId.startsWith('tweet-')) {
|
||||
filte_entries.push(entry);
|
||||
}
|
||||
else if (entryId.startsWith("homeConversation-") || entryId.startsWith("conversationthread-")) {
|
||||
} else if (entryId.startsWith('homeConversation-') || entryId.startsWith('conversationthread-')) {
|
||||
filte_entries.push(...entry.content.items);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (entryId.startsWith(filter)) {
|
||||
filte_entries.push(entry);
|
||||
}
|
||||
@@ -148,7 +151,7 @@ function gatherLegacyFromData(entries, filter = 'tweet-') {
|
||||
let tweet = content?.itemContent?.tweet_results?.result;
|
||||
if (tweet && tweet.tweet) {
|
||||
tweet = tweet.tweet;
|
||||
};
|
||||
}
|
||||
if (tweet) {
|
||||
const retweet = tweet.legacy?.retweeted_status_result?.result;
|
||||
for (const t of [tweet, retweet]) {
|
||||
@@ -210,7 +213,6 @@ const getUserMediaByID = async (id, params = {}) => gatherLegacyFromData(await t
|
||||
const getUserLikesByID = async (id, params = {}) => gatherLegacyFromData(await timelineLikes(id, params));
|
||||
const getUserTweetByStatus = async (id, params = {}) => gatherLegacyFromData(await tweetDetail(id, params), 'none');
|
||||
|
||||
|
||||
const excludeRetweet = function (tweets) {
|
||||
const excluded = [];
|
||||
for (const t of tweets) {
|
||||
|
||||
Reference in New Issue
Block a user