Start work
This commit is contained in:
parent
1e5bee5913
commit
01adcbde64
3 changed files with 20 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -129,3 +129,6 @@ dmypy.json
|
||||||
# Pyre type checker
|
# Pyre type checker
|
||||||
.pyre/
|
.pyre/
|
||||||
|
|
||||||
|
#fb3
|
||||||
|
*.fb3
|
||||||
|
.idea
|
10
.idea/fb3test.iml
generated
Normal file
10
.idea/fb3test.iml
generated
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.9 (fb3test)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
7
main.py
Normal file
7
main.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
from zipfile import ZipFile
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from lxml import etree
|
||||||
|
|
||||||
|
with ZipFile('1.fb3') as book:
|
||||||
|
for row in book.read('fb3/body.xml').decode('utf-8').splitlines():
|
||||||
|
print(row)
|
Loading…
Add table
Add a link
Reference in a new issue