While I cannot give you legal advice, it is likely that downloading YouTube videos violates their terms of service. You can subscribe to their Premium product to get offline access to videos safely.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence