Say, I need to periodically access OtherSite.com/myfile.xml and I want to automate downloading it via the Tor network.
Can I somehow route requests sent by cURL through the Tor network without opening a browser?
You can use torify
.
As per https://linuxaria.com/howto/how-to-anonymize-the-programs-from-your-terminal-with-torify:
torify is a simple wrapper that attempts to find the best underlying Tor wrapper available on a system. It calls torsocks or tsocks with a tor specific configuration file.
torify curl OtherSite.com/myfile.xml