summaryrefslogtreecommitdiffstats
path: root/src/instagram_task.ts
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-04-25 08:58:07 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-04-25 08:58:07 +0300
commitf05a0bb2b3433fb8c12209375ff8785916b9c841 (patch)
treed8a3d28a7fec1a9acebbac921382acf1e14da13b /src/instagram_task.ts
parent560a436d7f5cfa7e6547994f20ebffd62cbe4773 (diff)
Update IG scraper
Diffstat (limited to 'src/instagram_task.ts')
-rw-r--r--src/instagram_task.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/instagram_task.ts b/src/instagram_task.ts
index abe963a..2c6c6c8 100644
--- a/src/instagram_task.ts
+++ b/src/instagram_task.ts
@@ -78,13 +78,12 @@ export const runDownloadInstagramTask = async (task: InstagramTask) => {
}
}
- await page.type("input#url", task.url);
- await page.click("#btn-submit");
+ await page.type("input#input-url", task.url);
+ await page.click("#submit-btn");
- const downloadButton = await page.waitForSelector(
- ".download-content a[data-event=click_download_btn]",
- { timeout: 10_000 },
- );
+ const downloadButton = await page.waitForSelector("a[download]", {
+ timeout: 10_000,
+ });
if (!downloadButton) {
throw new Error("Could not find download button");
}