How can analyze the diffuse texture and normal texture from obj with a mtl , by using python
I solve it by material.node_tree.links.

for object in objects:
    for s in object.material_slots:
        if s.material and s.material.use_nodes:
            for link in s.material.node_tree.links:
                if link.to_node.name == "Principled BSDF" and link.to_socket.identifier == "Base Color":
                    if link.from_node.type == 'TEX_IMAGE':
                        print(s.material.name, "diffuse",link.from_node.image.filepath)
                if link.to_node.name == "Normal Map" and link.to_socket.identifier == "Color":
                    if link.from_node.type == 'TEX_IMAGE':
                        print(s.material.name, "normal", link.from_node.image.filepath)