A two day newbie in Python (and programming), so please be careful.
I have about 1,500 shortened URLs cleared of Twitter. They are all in the following format: http://t.co/ ...
Using this to deploy a short url:
import urllib2 a = urllib2.urlopen('http://t.co/..') print a.url
The last two lines were repeated about 1,500 times with different URLs.
It works well as long as the page that the URL points to, however, when there is no error message in it, it stops at that point. What am I adding to the code so that it returns βpage not foundβ and goes to the next URL and goes through the whole list without stopping.
source share