Access material node drivers from python
Look in NodeTree.animation_data

Python console code.  Loop thru materials that use nodes and have animation data, if so loop the drivers collection.



In simple example below find the couple of simple drivers including a  driver on a value node with expression "frame" (the current frame)

The drivers datapath gives the node name and the index of the socket. 

&gt;&gt;&gt; for m in bpy.data.materials:
...     m.name
...     if m.use_nodes and m.node_tree.animation_data:
...         for d in m.node_tree.animation_data.drivers:
...             d.data_path, d.driver.expression
...             
'Material'
('nodes["Value"].outputs[0].default_value', 'frame')
('nodes["Principled BSDF"].inputs[9].default_value', 'frame / 20')

&gt;&gt;&gt; 


Re socket index and name https://blender.stackexchange.com/a/160069/15543