Hello I have a usb webcam and am too broke for the picamera, is there anyway I can write a python program that can record video??
A few ideas spring to mind...

Identify which webcam you have

Plug it in and see if you can see it with:
sudo lsusb

Install v4l-utils and see if it is accessible:
sudo apt-get install v4l-utils
v4l2-ctl --list-devices

Install ffmpeg and try using it:
sudo apt install ffmpeg
ffplay /dev/video0


If this works, you can record with ffmpeg or use OpenCV videocapture() to grab and record frames.
How to take video on a raspberry pi with a usb webcam