diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-04-25 08:58:07 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-04-25 08:58:07 +0300 |
| commit | f05a0bb2b3433fb8c12209375ff8785916b9c841 (patch) | |
| tree | d8a3d28a7fec1a9acebbac921382acf1e14da13b /src | |
| parent | 560a436d7f5cfa7e6547994f20ebffd62cbe4773 (diff) | |
Update IG scraper
Diffstat (limited to 'src')
| -rw-r--r-- | src/instagram_task.ts | 11 |
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"); } |
