fork download
  1. import re
  2.  
  3.  
  4. string = 'https://y...content-available-to-author-only...e.com/embed/IVpOyKCNZYw TRASH'
  5. youtube = re.compile(r'youtube\..*/embed/\w*')
  6.  
  7. youtube_string = youtube.search(string).group()
  8. video_id = youtube_string[youtube_string.find('embed/') + 6:]
  9. print(video_id)
Success #stdin #stdout 0.03s 8688KB
stdin
Standard input is empty
stdout
IVpOyKCNZYw