Link Search Menu Expand Document

Downloading Audio Files

The .download() method retrieves URIs and downloads mp3 files for the Broadcastify archive.

download(start=None, end=None, all_entries=False,
         output_path=None)
ParameterData TypeRequirementDescription
startdatetimeSee valid date parameter combinationsThe earliest date & time for which to download files. Must be a valid date on the archive’s calendar.
enddatetimeSee valid date parameter combinationsThe latest date & time for which to download files. Must be a valid date on the archive’s calendar.
all_entriesboolSee valid date parameter combinationsDownload all available archive files
output_pathstrRequiredThe absolute path to which archive entry mp3 files will be written
Valid Date Parameter Combinations
startendall_entriesBehavior
AnyAnySuppliedRetrieve all files; ignore other arguments
SuppliedOmittedOmittedRetrieve from the earliest archive file through the file covering end
OmittedSuppliedOmittedRetrieve from the archive file containing start through the last archive file
SuppliedSuppliedOmittedRetrieve from the file containing start through the file covering end
OmittedOmittedOmittedRaise an error

Download Throttling

As of this writing, Broadcastify does not have a robots.txt file or any stated policy on automated access to their archives. In the spirit of good citizenship, the toolkit requests files serially and waits until at least 5 seconds have elapsed since the last valid mp3 file request (i.e. the mp3 file in the prior request existed on the server and did not already exist in output_path) before making a subsequent request. So, downloads are retrieved at a rate of about 12 files per minute.