commit fea7760c169cc60fe90c9738a6e3f6b3aadbbc2e
parent 2723fa73983b83e87014073a0bf45f72c35406dc
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 18 Nov 2026 14:28:48 -0500
e2e: the fake gallery-dl ends an Instagram run inside the page that reached max-posts
As the real extractor does: no cursor is logged for a page it never left, and
the page after it is never asked for.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/editor/e2e/fixtures/bin/fake-gallery-dl-instagram.mjs b/editor/e2e/fixtures/bin/fake-gallery-dl-instagram.mjs
@@ -156,9 +156,12 @@ export async function runInstagram(args) {
}
req(p === 0 ? feed : `${feed}&max_id=page-${p + 1}`);
for (const post of pages[p]) {
- if (emitted >= maxPosts) dump();
rows.push(...post);
emitted++;
+ // max-posts ends the run INSIDE the page that reached it, as the real
+ // extractor's islice does: no cursor is logged for a page it never
+ // left, and the next page is never asked for.
+ if (emitted >= maxPosts) dump();
}
// Logged when a page is LEFT, as the real extractor does.
if (p + 1 < pages.length) err(`[instagram][debug] Cursor: page-${p + 2}`);