Scraping, execute python script, http request, actions

I have quite a specific use case:
I’d like to go to a site and login, scrape some images, take each image and download a python file, pass it the image I scraped. Execute the python script, passing the file (local location) in the python script (as args), get the result (json I believe) and if the result = a range of (something) then on the post I scraped, execute an action.

I don’t believe n8n does browsing or css/button selection/pressing for http requests so I doubt this is achievable.

It also can’t keep track of any things it scraped.

Alternatively, using FTP to download folders (and the files inside), saving them locally, executing the python script, getting the result and deleting the files (in the remote FTP server) could also work (might be more achievable?)

I’m using docker, and tried using the Execute Command node and couldn’t url, wget or install any of these, nor Python…