I see you've patched the 0.29 version of mobiunpack.py. Is that the version you were using when you discovered the issue?
I only ask because v0.32 of mobiunpack.py (the latest can always be found in post
#5 of this thread) seems to have an updated regex pattern that would seem to achieve the same result as the regex in your patch:
From v0.32
Code:
link_pattern = re.compile(r'''<[^<>]+filepos=['"]{0,1}(\d+)[^<>]*>''', re.IGNORECASE)
From your patch
Code:
link_pattern = re.compile(r'''<a[ ]+filepos=['"]{0,1}0*(\d+)['"]{0,1} *>''', re.IGNORECASE)
Have you tried v0.32 to see if this issue might be a non-starter?