in , ,

centerJustifiedPython

centerJustifiedPython | python-memes, cli-memes, exception-memes | ProgrammerHumor.io
python-memes, cli-memes, exception-memes | ProgrammerHumor.io

Content

import logging import os from time import time from download import setupdownloaddir, getlinks, downloadlink logging.basicConfig (levellogging.INFO, format'(asctime)s – (name)s logger logging.getLogger ( name ) def main(): ts time clientid os.getenv (‘IMGURCLIENTID’) if not client id: raise Exception ("Couldn’t find IMGURCLIENTID environment varial downloaddir setupdownloaddir () links getlinks (clientid) for link in links: downloadink(downloaddir, link) logging. info (‘Took seconds’ , time () – ts) if name sa I main () main