Wikipedia indexer and shortest link finder
** this won't make your code more efficient, but is still something you should consider doing

With all your file opening, you should do it as:

with open('filename','r') as fin:
    urls/links = json.loads(fin.read())


while you have the try/catch block, your exception handler is not checking and closing open file handles, which is what the with context does