merge: 10.7.3 from main
This commit is contained in:
@@ -305,12 +305,12 @@ export default function instagram(obj) {
|
||||
if (sidecar) {
|
||||
const picker = sidecar.edges.filter(e => e.node?.display_url)
|
||||
.map((e, i) => {
|
||||
const type = e.node?.is_video ? "video" : "photo";
|
||||
const type = e.node?.is_video && e.node?.video_url ? "video" : "photo";
|
||||
|
||||
let url;
|
||||
if (type === 'video') {
|
||||
if (type === "video") {
|
||||
url = e.node?.video_url;
|
||||
} else if (type === 'photo') {
|
||||
} else if (type === "photo") {
|
||||
url = e.node?.display_url;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export default async function(o) {
|
||||
|
||||
let fileMetadata = {
|
||||
title: videoData.movie.title.trim(),
|
||||
author: (videoData.author?.name || videoData.compilationTitle).trim(),
|
||||
author: (videoData.author?.name || videoData.compilationTitle)?.trim(),
|
||||
}
|
||||
|
||||
if (bestVideo) return {
|
||||
|
||||
@@ -98,6 +98,14 @@ function aliasURL(url) {
|
||||
if (url.hostname === 'xhslink.com' && parts.length === 3) {
|
||||
url = new URL(`https://www.xiaohongshu.com/a/${parts[2]}`);
|
||||
}
|
||||
break;
|
||||
|
||||
case "loom":
|
||||
const idPart = parts[parts.length - 1];
|
||||
if (idPart.length > 32) {
|
||||
url.pathname = `/share/${idPart.slice(-32)}`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return url;
|
||||
|
||||
Reference in New Issue
Block a user