forked from encrypt/random
10 lines
282 B
Python
10 lines
282 B
Python
from xml.etree import ElementTree as ET
|
|
|
|
tree = ET.parse('package.opf')
|
|
root = tree.getroot()
|
|
ns = {'opf': 'http://www.idpf.org/2007/opf'}
|
|
manifest = root.find('opf:manifest', ns)
|
|
base_url = ""
|
|
|
|
for item in manifest.findall('opf:item', ns):
|
|
print(base_url+item.attrib['href'])
|