You should get a wire tester. If you don't know what that is, it looks like a screwdriver, but the handle has a bulb in it with a wire coming out of the top. And the other end is a sharp point.
You can figure out which wire is for your headlights by testing it to see when it's hot or cold.
You should be ok tapping into the headlight wiring.