0

I need to go to this webpage everyday and save the file on pdf because the data on the website is not available for more than a day. However either due to time constraints or some reason i am not able to do it, plus it is really cumbersome to be going to the webpage everyday and saving it on pdf. What i was wondering if there is a software that can accomplish this. It needs to just save on on particular time. If there is a python script which does this, that would work too. Any advise you can give would be greatly appreciated.

2 Answers 2

1

You can use a node.js script. Requires puppeteer (npm i -g puppeteer)

index.js:

const puppeteer = require("puppeteer");

(async () => {
    const [url, filePath] = process.argv.slice(2)
    const width = 1920
    const height = 1080

    const browser = await puppeteer.launch();
    const page = await browser.newPage();
    await page.goto(url, { waitUntil: "networkidle2" });
    await page.setViewport({ width, height });
    await page.pdf({ path: filePath, width, height });
    await browser.close();
})();

Then simply setup task scheduler to run node index.js https://google.com google.pdf

-1

You could have the Windows Task Scheduler run an AutoHotkey script automatically. AHK can also convert their AHK file type to EXE for ease of access as well.

Here is the docs page for Windows Task Scheduler: https://docs.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler

And the AHK webpage: https://www.autohotkey.com

as well as the docs for AHK: https://www.autohotkey.com/docs/AutoHotkey.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.