fix LibraryScraper
This commit is contained in:
13
app/helper/nfo.py
Normal file
13
app/helper/nfo.py
Normal file
@ -0,0 +1,13 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class NfoReader:
|
||||
def __init__(self, xml_file_path: Path):
|
||||
self.xml_file_path = xml_file_path
|
||||
self.tree = ET.parse(xml_file_path)
|
||||
self.root = self.tree.getroot()
|
||||
|
||||
def get_element_value(self, element_path):
|
||||
element = self.root.find(element_path)
|
||||
return element.text if element is not None else None
|
Reference in New Issue
Block a user