general: fixes and improvements for several personalization features

2: I102 copyright year is outdated, expected 2014 but got 2013
26:1: F401 'time' imported but unused
30:1: F401 'threading' imported but unused
42:1: F401 'CFG_BIBRANK_SHOW_DOWNLOAD_STATS' imported but unused
43:6: E126 continuation line over-indented for hanging indent
74:1: F401 'pageheaderonly' imported but unused
76:1: F401 'page_start' imported but unused
76:1: F401 'page_end' imported but unused
76:1: F401 'get_most_popular_field_values' imported but unused
76:1: F401 'create_similarly_named_authors_link_box' imported but unused
77:6: E126 continuation line over-indented for hanging indent
95:1: F401 'get_fieldvalues' imported but unused
95:1: F401 'get_fieldvalues_alephseq_like' imported but unused
96:6: E126 continuation line over-indented for hanging indent
105:1: F401 'get_cited_by_list' imported but unused
106:1: F401 'get_download_weight_total' imported but unused
107:1: F401 'summarize_records' imported but unused
124:83: E502 the backslash is redundant between brackets
130:1: E302 expected 2 blank lines, found 1
130: D202 No blank lines allowed *after* function docstring, found 1
130: D200 One-line docstring should not occupy 3 lines
136:12: W601 .has_key() is deprecated, use 'in'
168:1: E302 expected 2 blank lines, found 1
168: D290 White spaces around docstring should be trimmed.
168: D203 Expected 1 blank line *before* class docstring, found 0
168: D204 Expected 1 blank line *after* class docstring, found 0
172: D102 Docstring missing
174:17: E203 whitespace before ':'
175:21: E203 whitespace before ':'
187:22: E203 whitespace before ':'
188:26: E203 whitespace before ':'
189:21: E203 whitespace before ':'
190:26: E203 whitespace before ':'
191:23: E203 whitespace before ':'
204:1: E302 expected 2 blank lines, found 1
204: D290 White spaces around docstring should be trimmed.
204: D203 Expected 1 blank line *before* class docstring, found 0
204: D400 First line should end with '.', not 't'
213: D102 Docstring missing
235: D102 Docstring missing
250:17: E128 continuation line under-indented for visual indent
255:28: W601 .has_key() is deprecated, use 'in'
278:86: E203 whitespace before ':'
280:21: E127 continuation line over-indented for visual indent
280:67: E203 whitespace before ':'
280:91: E203 whitespace before ':'
283:52: E502 the backslash is redundant between brackets
284:17: E128 continuation line under-indented for visual indent
284:32: E502 the backslash is redundant between brackets
285:17: E128 continuation line under-indented for visual indent
298:42: E261 at least two spaces before inline comment
298:43: E262 inline comment should start with '# '
312:1: E302 expected 2 blank lines, found 1
312: D290 White spaces around docstring should be trimmed.
312: D203 Expected 1 blank line *before* class docstring, found 0
312: D400 First line should end with '.', not 't'
321: D102 Docstring missing
341: D102 Docstring missing
353:17: E128 continuation line under-indented for visual indent
358:28: W601 .has_key() is deprecated, use 'in'
383:21: E128 continuation line under-indented for visual indent
384:21: E128 continuation line under-indented for visual indent
402:1: E302 expected 2 blank lines, found 1
402: D290 White spaces around docstring should be trimmed.
402: D203 Expected 1 blank line *before* class docstring, found 0
407: D290 White spaces around docstring should be trimmed.
420:17: E128 continuation line under-indented for visual indent
421:40: E126 continuation line over-indented for hanging indent
425:28: W601 .has_key() is deprecated, use 'in'
464:102: E203 whitespace before ':'
466:37: E127 continuation line over-indented for visual indent
466:83: E203 whitespace before ':'
466:107: E203 whitespace before ':'
469:64: E502 the backslash is redundant between brackets
470:29: E128 continuation line under-indented for visual indent
470:44: E502 the backslash is redundant between brackets
471:29: E128 continuation line under-indented for visual indent
481:94: E203 whitespace before ':'
483:29: E127 continuation line over-indented for visual indent
483:75: E203 whitespace before ':'
483:99: E203 whitespace before ':'
486:60: E502 the backslash is redundant between brackets
487:25: E128 continuation line under-indented for visual indent
487:40: E502 the backslash is redundant between brackets
488:25: E128 continuation line under-indented for visual indent
524: D202 No blank lines allowed *after* method docstring, found 1
534:94: E203 whitespace before ':'
536:29: E127 continuation line over-indented for visual indent
536:75: E203 whitespace before ':'
536:99: E203 whitespace before ':'
539:60: E502 the backslash is redundant between brackets
540:25: E128 continuation line under-indented for visual indent
540:40: E502 the backslash is redundant between brackets
541:25: E128 continuation line under-indented for visual indent
562:28: W601 .has_key() is deprecated, use 'in'
570:9: E303 too many blank lines (2)
580:1: E302 expected 2 blank lines, found 1
580: D290 White spaces around docstring should be trimmed.
580: D203 Expected 1 blank line *before* class docstring, found 0
585: D290 White spaces around docstring should be trimmed.
585: D202 No blank lines allowed *after* method docstring, found 1
612:1: E302 expected 2 blank lines, found 1
612: D290 White spaces around docstring should be trimmed.
625: D209 Put multi-line docstring closing quotes on separate line
625: D400 First line should end with '.', not 't'
625: D205 Blank line missing between one-line summary and description
638: D401 First line should be imperative: 'Thi', not 'This'
638: D290 White spaces around docstring should be trimmed.
638: D209 Put multi-line docstring closing quotes on separate line
638: D202 No blank lines allowed *after* method docstring, found 1
638: D400 First line should end with '.', not 'r'
638: D205 Blank line missing between one-line summary and description
661:24: W601 .has_key() is deprecated, use 'in'
672:9: E303 too many blank lines (2)
753:13: E301 expected 1 blank line, found 0
753: D400 First line should end with '.', not 'I'
755:63: E231 missing whitespace after ','
762: D290 White spaces around docstring should be trimmed.
771: D400 First line should end with '.', not 'e'
776:55: E202 whitespace before '}'
785:16: W601 .has_key() is deprecated, use 'in'
794:20: W601 .has_key() is deprecated, use 'in'
810:16: W601 .has_key() is deprecated, use 'in'
817:1: E302 expected 2 blank lines, found 1
817: D209 Put multi-line docstring closing quotes on separate line
817: D400 First line should end with '.', not 'g'
817: D205 Blank line missing between one-line summary and description
822:84: E203 whitespace before ':'
833:17: E128 continuation line under-indented for visual indent
873:45: E128 continuation line under-indented for visual indent
909:12: E127 continuation line over-indented for visual indent
941:1: E302 expected 2 blank lines, found 1
941: D400 First line should end with '.', not 'e'
941: D205 Blank line missing between one-line summary and description
961:59: E502 the backslash is redundant between brackets
962:32: F812 list comprehension redefines 'doi' from line 941
970:74: E502 the backslash is redundant between brackets
986:27: F841 local variable 'e' is assigned to but never used
999:1: E302 expected 2 blank lines, found 1
999: D203 Expected 1 blank line *before* class docstring, found 0
1002: D202 No blank lines allowed *after* method docstring, found 1
1011:38: E231 missing whitespace after ':'
1020:94: E203 whitespace before ':'
1022:29: E127 continuation line over-indented for visual indent
1022:75: E203 whitespace before ':'
1022:99: E203 whitespace before ':'
1025:60: E502 the backslash is redundant between brackets
1026:25: E128 continuation line under-indented for visual indent
1026:40: E502 the backslash is redundant between brackets
1027:25: E128 continuation line under-indented for visual indent
1048:27: F841 local variable 'e' is assigned to but never used
1067:59: E127 continuation line over-indented for visual indent
1068:59: E127 continuation line over-indented for visual indent
1069:59: E127 continuation line over-indented for visual indent
1070:59: E127 continuation line over-indented for visual indent
1071:59: E127 continuation line over-indented for visual indent
1072:59: E127 continuation line over-indented for visual indent
1073:59: E127 continuation line over-indented for visual indent
1074:59: E127 continuation line over-indented for visual indent
1087:13: E122 continuation line missing indentation or outdented
1132: D290 White spaces around docstring should be trimmed.
1132: D203 Expected 1 blank line *before* class docstring, found 0
1132: D400 First line should end with '.', not 't'
1137: D102 Docstring missing
1146: D102 Docstring missing
1156:17: E128 continuation line under-indented for visual indent
1161:28: W601 .has_key() is deprecated, use 'in'
1186:86: E203 whitespace before ':'
1188:21: E127 continuation line over-indented for visual indent
1188:67: E203 whitespace before ':'
1188:91: E203 whitespace before ':'
1191:52: E502 the backslash is redundant between brackets
1192:17: E128 continuation line under-indented for visual indent
1192:32: E502 the backslash is redundant between brackets
1193:17: E128 continuation line under-indented for visual indent
1207:1: E302 expected 2 blank lines, found 1
1207: D203 Expected 1 blank line *before* class docstring, found 0
1207: D400 First line should end with '.', not 's'
1207: D200 One-line docstring should not occupy 3 lines
1214: D401 First line should be imperative: 'Redirect', not 'Redirects'
1214: D200 One-line docstring should not occupy 3 lines
1220: D202 No blank lines allowed *after* method docstring, found 1
1220: D200 One-line docstring should not occupy 3 lines
1236:73: E502 the backslash is redundant between brackets
1240:68: E502 the backslash is redundant between brackets
1243:45: E121 continuation line under-indented for hanging indent
1243:55: E203 whitespace before ':'
1246:50: E203 whitespace before ':'
1249:13: E124 closing bracket does not match visual indentation
1273:30: E251 unexpected spaces around keyword / parameter equals
1274:34: E126 continuation line over-indented for hanging indent
1274:49: E203 whitespace before ':'
1276:43: E203 whitespace before ':'
1277:31: E126 continuation line over-indented for hanging indent