Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex doesn't work for these cases #9

Open
a1Gupta opened this issue Jul 27, 2017 · 7 comments
Open

Regex doesn't work for these cases #9

a1Gupta opened this issue Jul 27, 2017 · 7 comments

Comments

@a1Gupta
Copy link

a1Gupta commented Jul 27, 2017

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.

@a1Gupta a1Gupta changed the title Regex doesn't work for this case Regex doesn't work for these cases Jul 27, 2017
@tunnckoCore
Copy link
Member

tunnckoCore commented Jul 27, 2017

What you mean with the trending link? It's not meant to work for /feed/trending, that's not an ID.

Also why is video id length range 6-11? From what I found, video ids are 11 chars.

Because i found that they are between 6-11, at least there may be some old that are 6, don't know.
I any case it's not just some random range chosen by me.

@tunnckoCore
Copy link
Member

As about youtube.com/HamdiKickProduction?v=DFYRQ_zQ-gk, it redirects to /watch in any way.
I don't believe we can handle any crazy case other there with just regex :D They are pretty good and powerful, but not always.

@a1Gupta
Copy link
Author

a1Gupta commented Jul 27, 2017

Trending link is not a valid video url but regex matches this url - youtube.com/feed/trending

@tunnckoCore
Copy link
Member

Oh, right, got it.

@a1Gupta
Copy link
Author

a1Gupta commented Jul 27, 2017

Because i found that they are between 6-11, at least there may be some old that are 6, don't know.
I any case it's not just some random range chosen by me.

Can you share the reference for this? Here is a link which discusses about it.

@a1Gupta
Copy link
Author

a1Gupta commented Jul 27, 2017

As about youtube.com/HamdiKickProduction?v=DFYRQ_zQ-gk, it redirects to /watch in any way.
I don't believe we can handle any crazy case other there with just regex :D They are pretty good and powerful, but not always.

Makes sense.

@tunnckoCore
Copy link
Member

tunnckoCore commented Jul 27, 2017

Can you share the reference for this?

No, I don't remember it. But thanks for the link!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants