Animation Nodes: How to create splines from two different points in order to create procedural telegraph poles?
The Rotation To Direction node can be used to get a vector pointing along the local x axis of the objects, This direction is then added to the location of the object giving you point one, the inverse of that vector is added to the location giving you point two. You now have two points per object, use them in your node tree.