<s> import logging <EOL> import os <EOL> from time import time <EOL> from download import setup_download_dir , get_links , download_link <EOL> logging . basicConfig ( level = logging . INFO , format = '<STR_LIT>' ) <EOL> logger = logging . getLogger ( __name__ ) <EOL> def main ( ) : <EOL> ts = time ( ) <EOL> client_id = os . getenv ( '<STR_LIT>' ) <EOL> if not client_id : <EOL> raise Exception ( "<STR_LIT>" ) <EOL> download_dir = setup_download_dir ( ) <EOL> links = ( l for l in get_links ( client_id ) if l . endswith ( '<STR_LIT>' ) ) <EOL> for link in links : <EOL> download_link ( download_dir , link ) <EOL> logging . info ( '<STR_LIT>' , time ( ) - ts ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
