if __name__ == '__main__'
is just convention to create amain()
entry point for the code- Command line arguments can easily be added importing
sys
and using thesys.argv
list - Argparse can also be used to create more rich argument like this
- This basic version uses wget to download the file it found. You can add more arguments to wget using the existing
subprocess.run()
function - wget has some helpful options that may be considered depending on preference:
--no-clobber
or-nc
won't download a file that has the same name-N
will overwrite a file that has the same name-O
can be used to specify a file output name. This can be useful if a standardized file name is required (such as using the current date)
- curl can be used instead of the requests library [like this](https://github.com/Davey-Hughes/hltv_stats/blob/master/src/