View Single Post
Old 12-14-2011, 04:32 AM   #13
faber1971
Enthusiast
faber1971 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Dec 2011
Device: Kindle 3
I don't know if this can help, but somewhere on the web (http://forum.simplicissimus.it) I found this possible tip:


substitute

preprocess_regexps = [
(re.compile(r'.*?<head>', re.DOTALL|re.IGNORECASE), lambda match: '<head>'),
(re.compile(r'<head>.*?<title>', re.DOTALL|re.IGNORECASE), lambda match: '<head><title>'),
(re.compile(r'</title>.*?</head>', re.DOTALL|re.IGNORECASE), lambda match: '</title></head>')
]

with

preprocess_regexps = [
(re.compile(r'<head>.*?', re.DOTALL|re.IGNORECASE), lambda match: '<head>'),
(re.compile(r'<head>.*?<title>', re.DOTALL|re.IGNORECASE), lambda match: '<head><title>'),
(re.compile(r'</title>.*?</head>', re.DOTALL|re.IGNORECASE), lambda match: '</title></head>')
]


It seems to be working good!!!
Credits: timewolf on http://forum.simplicissimus.it/calib...?topicseen#new
faber1971 is offline   Reply With Quote