I have a variable that automatic generates the url of thumb from youtube.
For example one custom post has
$video_thumb_url = 'https://img.youtube.com/vi/' . $matches_1['1'] . '/maxresdefault.jpg';
where $matches_1['1'] is the ID from Youtube.
Is there some way to take this URL and automatic upload the image in my server and then set it as featured of that relevant post?