Created
October 23, 2014 11:21
-
-
Save sugavaneshb/a6df17ff45a84112884a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
embeds_re = re_compile(r''' | |
(?:youtube(?:-nocookie)?\.com # youtube.com or youtube-nocookie.com | |
| # or | |
youtu\.be)/ # youtu.be | |
(?:embed/|watch\?v=|watch/\?v=|embed/\?v=)? # /embed/... or /watch?v=... or /watch/?v=... or /embed/?v=... or /... | |
([^\s\"\?&]{11}) # capture & stop at whitespace " ? & | |
''', VERBOSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment