Search code examples
pythonwgeturllib3

How to download files continuously using Python wget or urllib3


How to download files continuously using Python wget or urllib3.

My wish is to download automatic files at intervals, such as at intervals of 1 hour. on the official urllib3 page, there is Retrying Requests content for its users


Solution

  • Well, let me give you an answer and you can clarify the question:

     from time import sleep
    
     while True:
        download()
        sleep(36000)
    

    where download() is a function that calls wget or urllib3.