sb: Change urlib to urllib2 on Python2 and add user agent support.
Some sites block the standard python user agent. Change to Wget as it seems to make the tested sites behave.
Limit the size of long URLs when logging to the user.
Closes #2656.