Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import numpy as np
  2. places = np.array([x for x in range(312, 333)])
  3. tomes = ['I','II','III']
  4. pages = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19']
  5.  
  6. import requests
  7. for pl in places:
  8. for t in tomes:
  9. for pa in pages:
  10. img = 'http://alpi.csic.es/cuadernillos/{}/{}/{}-{}_Pagina_{}.jpg'.format(pl, t, pl, t, pa)
  11. img_name = '{}_{}_{}.jpg'.format(pl, t, pa)
  12. p = requests.get(img)
  13. if p.status_code != 404:
  14. out = open('{}'.format(img_name), "wb+")
  15. out.write(p.content)
  16. out.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement