File tree Expand file tree Collapse file tree 25 files changed +290
-0
lines changed Expand file tree Collapse file tree 25 files changed +290
-0
lines changed Original file line number Diff line number Diff line change 1+ import requests
2+
3+
4+ def main ():
5+ seed = "http://www.pythonchallenge.com/pc/hex/"
6+ file_path = "lake/"
7+ first_step (seed , file_path )
8+
9+
10+ def first_step (seed , file_path ):
11+ for i in range (2 , 26 ):
12+ url = seed + str (i ) + ".wav"
13+ file_name = file_path + str (i ) + ".wav"
14+ download_a_file (url , file_name )
15+
16+
17+ def download_a_file (url , file_name ):
18+ res = requests .get (url )
19+ bs = res .content
20+ file = open (file_name , "wb" )
21+ file .write (bs )
22+ print ("Download {}" .format (file_name ))
23+
24+
25+ if __name__ == "__main__" :
26+ main ()
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" iso-8859-1" ?>
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+ <html xmlns =" http://www.w3.org/1999/xhtml" xml : lang =" en" lang =" en" >
5+ <head >
6+ <title >401 - Unauthorized</title >
7+ </head >
8+ <body >
9+ <h1 >401 - Unauthorized</h1 >
10+ </body >
11+ </html >
You can’t perform that action at this time.
0 commit comments