style: auto format

This commit is contained in:
github-actions[bot]
2023-05-01 20:34:18 +00:00
parent 334485899c
commit 3888e6781c
2 changed files with 16 additions and 15 deletions
-1
View File
@@ -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
### 用户页面
+16 -14
View File
@@ -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) {