def wget(ftp, f = False, exclude = False, name = False, md5 = False, tries = <NUM_LIT:10>):
<EOL>if f is False:<EOL><INDENT>f = ftp.rsplit('<STR_LIT:/>', <NUM_LIT:1>)[-<NUM_LIT:1>]<EOL><DEDENT>t = <NUM_LIT:0><EOL>while md5check(f, ftp, md5, exclude) is not True:<EOL><INDENT>t += <NUM_LIT:1><EOL>if name is not False:<EOL><INDENT>print('<STR_LIT>', name, f)<EOL><DEDENT>if exclude is False:<EOL><INDENT>command = '<STR_LIT>' % (ftp)<EOL><DEDENT>else:<EOL><INDENT>command = '<STR_LIT>' % (exclude, ftp)<EOL><DEDENT>p = Popen(command, shell = True)<EOL>p.communicate()<EOL>if t >= tries:<EOL><INDENT>print('<STR_LIT>', name, f)<EOL>return [f, False]<EOL><DEDENT><DEDENT>return [f, True]<EOL>
download files with wget