Skip to content

Instantly share code, notes, and snippets.

@muhammedfurkan
Last active December 26, 2020 21:41
Show Gist options
  • Save muhammedfurkan/b479f16721514025a36b09b56e18f750 to your computer and use it in GitHub Desktop.
Save muhammedfurkan/b479f16721514025a36b09b56e18f750 to your computer and use it in GitHub Desktop.
youtube playlist checker
import re
def youtube_url_validation(url):
youtube_regex = (r'(https?://)?(www\.)?(youtube|youtu|youtube-nocookie)\.(com|be)/(playlist\?list=|embed/|v/|.\?)')
youtube_regex_match = re.match(youtube_regex, url)
if youtube_regex_match:
return "success"
return "error"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment