regexhq / youtube-regex Goto Github PK
View Code? Open in Web Editor NEWBest YouTube Video ID regex. Online: https://regex101.com/r/rN1qR5/2 and http://regexr.com/3anm9
Home Page: share: http://j.mp/1vrEbfQ
License: Other
Best YouTube Video ID regex. Online: https://regex101.com/r/rN1qR5/2 and http://regexr.com/3anm9
Home Page: share: http://j.mp/1vrEbfQ
License: Other
Is there a way we can have it so this module supports Youtube thumbnail URLs? Here is a relevant Stackoverflow question.
Ideally the regex would support URLs such as
https://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
Along with the other quality thumbnails.
There are half decades old issues and no recent activity. Most recent issues seem like it needs some response but none are present. Do you need help or?
Youtu.be is youtube's short url
Possibly missing something, but it seems to me like:
module.exports = /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\/?\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/g;
Would be a better solution and let you get the benefits of Node module caching. Is there a reason you don't use it?
Hey there!
I'd like to report a security issue but cannot find contact instructions on your repository.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
It doesn't work on some youtube.com/tv
links
related: ytdl-org/youtube-dl#11485
Hello,
It seems like this URL with a trailing slash after watch
is a valid Youtube URL.
https://www.youtube.com/watch/?v=v2ifWcnQs6M
I haven't seen it offered officially by Youtube, but some of our users submitted links (that failed) with such slash.
Is is something you could support?
Anyway thank you for offering this module.
Cheers
https://www.youtube.com/HamdiKickProduction?v=DFYRQ_zQ-gk
https://www.youtube.com/feed/trending
Also why is video id length range 6-11? From what I found, video ids are 11 chars.
I tried, just for curiosity, against this URL https://www.youtube.com/watch?v=_T2Dxgn-lls
in a normal Firefox browser with normal .match
and it wouldn't work unless removing the g
flag. After removing it the regex returned the id
in the array as needed. Is this the wanted behaviour?
cuz dont like these online regex tools 💃
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.