Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import urllib.request
  2. try:
  3. print('entering urlretrieve')
  4. # If connection failed after entering the function urllib.request.urlretrieve()
  5. urllib.request.urlretrieve('img_url','temp_location')
  6. print('exited urlretrieve')
  7. except:
  8. print('connection problem')
  9. print('program ended')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement