How to get camera label name?

I’m working on a project wherein I have to capture frames from a particular USB camera using its device label. But I couldn’t find a method in OpenCV to choose a camera based on label( in javascript there is MediaDeviceInfo.label) Are there any methods to do the same either using OpenCV or any other libraries?

Language: python
OS: Ubuntu, Windows,MacOS

In Linux/MacOS you can open the camera using its name in the dev/v4l/by-id folder. E.g.:

webcam = cv2.VideoCapture('/dev/v4l/by-id/integratedwebcam`)