If the lecture is not already recorded (not all are). You can ask the lecturer permission to record it. They may let you, they may not. I have seen lecturers give permission to individual students.
Some people do record the lecturer without asking permission - some get away with it, some don't...