Greasy Fork is available in English.

Twitter(X)ᴾˡᵘˢ+++ ; Youtubeᴾˡᵘˢ+++

This script will provide enhancements to some websites. 🔥Twitter(X): Add time formatting display, HD picture display, picture and video downloading, etc. 🔥Youtube: Add video downloading, ad removal, etc. 🔥Tiktok: Provide HD watermark-free video downloading, etc. For more features, please check the description~

< 腳本Twitter(X)ᴾˡᵘˢ+++ ; Youtubeᴾˡᵘˢ+++的回應

評論:正評 - 腳本一切正常

§
發表於:2024-08-06

If you cant download X images, try changing the code from line 923 to this


if (typeof medias === 'undefined') {
try {
// Verify if the tweet has media
if (json.quoted_status_result && json.quoted_status_result.result && json.quoted_status_result.result.legacy && json.quoted_status_result.result.legacy.extended_entities && json.quoted_status_result.result.legacy.extended_entities.media) {
let mediaEntities = json.quoted_status_result.result.legacy.extended_entities.media;
medias = Object.values(mediaEntities);
console.log("Medias:", medias);

// Extract image's URL
let imageUrls = medias.map(media => media.media_url_https);
console.log("Image URLs:", imageUrls);
} else {
console.warn("No media found in the quoted tweet.");
medias = [];
}
} catch (e) {
console.error("Error parsing media entities: ", e);
medias = [];
}
}

發表回覆

登入以回復