api/facebook: update video and share urls (#1531)

This commit is contained in:
wukko 2026-03-30 15:28:55 +06:00 committed by GitHub
parent e6a987cd4f
commit 23463d518b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,9 +24,9 @@ const resolveUrl = (url, dispatcher) => {
}
export default async function({ id, shareType, shortLink, dispatcher }) {
let url = `https://web.facebook.com/i/videos/${id}`;
let url = `https://www.facebook.com/reel/${id}`;
if (shareType) url = `https://web.facebook.com/share/${shareType}/${id}`;
if (shareType) url = `https://www.facebook.com/share/${shareType}/${id}`;
if (shortLink) url = await resolveUrl(`https://fb.watch/${shortLink}`, dispatcher);
const html = await fetch(url, { headers, dispatcher })