fb3test/src/fb3_reader/fb3.py
2021-01-01 18:42:17 +00:00

13 lines
341 B
Python

import sys
from zipfile import ZipFile
# from bs4 import BeautifulSoup
# from lxml import etree
def reader():
files = input("Enter the path to file: ")
with ZipFile(files) as book:
for row in book.read('2/fb3/body.xml').decode('utf-8').splitlines():
opened = open("test.txt", "a")
opened.write(row)