diff --git a/updateIndex.py b/updateIndex.py index 9064977ba70171d47dc9ca3da8e5e5202705dfac..74c513ad94390e6caa52b2238a490fc5a6f5c180 100644 --- a/updateIndex.py +++ b/updateIndex.py @@ -75,14 +75,14 @@ def updateIndex(args:argparse.Namespace) -> None: # Remove the element <li> for the document if args.documentLink is not None and args.documentName is not None: # Find the element to delete - element_to_delete = soup.find('li', text=args.documentName) + element_to_delete = soup.find('li', string=args.documentName) # Check if the element is found before attempting to delete it if element_to_delete: # Remove the element from the HTML tree element_to_delete.decompose() else: print("Element not found.") - elif soup.find('li', text=args.documentName): + elif soup.find('li', string=args.documentName): print("'index.html' does already contain the entry") else: # Find document list