Handle urllib errors and allow priority selection