Bug fixes in tvtropes crawler

Too many connection errors and some exceptions such as IntegrityError, FlushError and MultipleResultsFound are handled.
These commits are currently functional. 

According to PEP 8, module-level functions and classes has to be separated by two blank lines.