Advertisement
Guest User

no u

a guest
Jun 27th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. import csv, urllib.request
  2.  
  3. algs = []
  4. case_names = []
  5.  
  6. with open("algs.txt", "r") as f:
  7.     csvfile = csv.reader(f)
  8.     for row in csvfile:
  9.         algs.append(row[0])
  10.         case_names.append(row[1])
  11.  
  12. images = []
  13.  
  14. for alg in algs:
  15.     images.append("http://localhost/visualcube/visualcube.php?stage=cmll&fmt=png&size=500&view=plan&case={}".format(alg))
  16.  
  17. for n in range(len(images)):
  18.     urllib.request.urlretrieve(images[n], case_names[n]+".png")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement