ignore osx resource forks

This commit is contained in:
j 2014-11-15 01:05:33 +00:00
parent d722ae004b
commit 121a2c9ac3
1 changed files with 4 additions and 2 deletions

View File

@ -85,11 +85,13 @@ def info(epub):
return data
def extract_text(path):
data = b''
data = ''
z = zipfile.ZipFile(path)
for f in z.filelist:
if '/._' in f.filename or f.filename.startswith('._'):
continue
if f.filename.endswith('html'):
data += z.read(f.filename)
data += z.read(f.filename).decode()
return data
def extract_isbn(data):