mirror of
https://github.com/imputnet/cobalt.git
synced 2026-04-23 10:18:15 +00:00
api/facebook: update video and share urls (#1531)
This commit is contained in:
parent
e6a987cd4f
commit
23463d518b
@ -24,9 +24,9 @@ const resolveUrl = (url, dispatcher) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function({ id, shareType, shortLink, 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);
|
if (shortLink) url = await resolveUrl(`https://fb.watch/${shortLink}`, dispatcher);
|
||||||
|
|
||||||
const html = await fetch(url, { headers, dispatcher })
|
const html = await fetch(url, { headers, dispatcher })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user