Update linkextractor.py

Some makeup and try/except block.
Merge pull request #1 from itopaloglu83/patch-1

improvements all around thanks to  itopaloglu83