Download some JPG files and make it a single PDF & share it

I download some jpg files (A4 size) from a website and convert all the files into a single pdf file and email it.

The jpg files are in a url format of:

The date today is 2020/7/26 and page number as 2 char (01-15)

How can I automate the whole process so it does it automatically without any thing from me?

My technical background is I learnt MS office packages in school and completed FreeCodeCamp’s Responsive Web Design Certification and I am currently doing Automate the Boring Stuff with Python.

I just have a laptop, no server or any cloud accounts. So, I am hoping that I can run it program/script (not sure of the difference) on some free service.

Is Google App Script capable of doing what I want?

Pls mention the steps I need to follow or better if you can like me to a tutorial of anyone doing a project similar to mine.

Welcome, rompdeck.

I am not familiar with converting a jpg to pdf.

As for the other steps, you could choose many paths to accomplish the same thing:

  1. If you are familiar with Python (or want to spend time learning it), then you could use a package like Beautiful Soup (or, if the website you are scraping from has content delivered via JavaScript, Selenium) to scrape the download links and fetch the data.
  • If you want this to run off of your PC, then you could periodically call the script (manually), or setup something similar to a scheduled task to call the script however often you want.
  • If you want the script to run 24/7, then you would need to look into a service like PythonAnywhere to host and run a Python script in the cloud. This comes with pitfalls of the free service allows only a certain amount of CPU time (so, 24/7 runtime would require a paid service).
  1. If you are happy with JavaScript, the same thing above can be done with Cheerio (or, Puppeteer).
  • Again, setup the server on your pc using Nodejs.
  • Or, find a service like Heroku to host your app (again, free service might not work for 24/7 operation).
  1. As you have linked, there are a few extensions/pre-made scripts you could use to automate this, but you would still need a service to host this, or leave your pc running in the background…

As a final note, I will stress the ethical and potentially legal issues with scraping content off of the web. If content is freely available, the platform may still not welcome bots scraping their content. So, I urge you to be sure about following any T&Cs related to the site and its content.

Some related links:

Hope this helps

1 Like