mirror of
https://github.com/imputnet/cobalt.git
synced 2026-08-27 04:16:54 +00:00
Merge 27a1089e1f into 54655720bf
This commit is contained in:
commit
9d5f5277c8
1 changed files with 6 additions and 4 deletions
|
|
@ -305,6 +305,8 @@ export default function instagram(obj) {
|
|||
if (sidecar) {
|
||||
const picker = sidecar.edges.filter(e => e.node?.display_url)
|
||||
.map((e, i) => {
|
||||
// if extracted from HTML embed, the first GraphVideo node from a "multipost" post sometimes
|
||||
// reports `is_video` without a `video_url`. this also breaks the official Instagram "multipost" embed.
|
||||
const type = e.node?.is_video && e.node?.video_url ? "video" : "photo";
|
||||
|
||||
let url;
|
||||
|
|
@ -436,13 +438,13 @@ export default function instagram(obj) {
|
|||
if (media_id && !hasData(data)) data = await requestMobileApi(media_id);
|
||||
if (media_id && cookie && !hasData(data)) data = await requestMobileApi(media_id, { cookie });
|
||||
|
||||
// html embed (no cookie, cookie)
|
||||
if (!hasData(data)) data = await requestHTML(id);
|
||||
if (!hasData(data) && cookie) data = await requestHTML(id, cookie);
|
||||
|
||||
// web app graphql api (no cookie, cookie)
|
||||
if (!hasData(data)) data = await requestGQL(id);
|
||||
if (!hasData(data) && cookie) data = await requestGQL(id, cookie);
|
||||
|
||||
// html embed (no cookie, cookie)
|
||||
if (!hasData(data)) data = await requestHTML(id);
|
||||
if (!hasData(data) && cookie) data = await requestHTML(id, cookie);
|
||||
} catch {}
|
||||
|
||||
if (!hasData(data)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue