You can download video and audio files for offline viewing from a variety of websites using youtube-dl. Be sure to install ffmpeg as well for tagging.
Useful size specs:
Name
Width
(Max) Height
Notes
480p
854
480
DVD quality
540p
960
540
“Quarter HD”, pretty uncommon (except on VHX)
720p
1280
720
Often just called “HD”
1080p
1920
1080
Often called “Full HD”
Most of the time, you’ll need a newer version of youtube-dl than is available in your distro’s repos… Or that can be installed using pip. The easiest way to get do this is to install youtube-dl at the system level (to make sure that all the dependencies are present), and then to grab the latest youtube-dl source code from GitHub and build it in a Python virtual environment.