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

Unable to from url's like http://m.youtube.com/#/watch?v=p9mfw_ZoCFE #484

Closed
ghost opened this issue Oct 21, 2012 · 5 comments
Closed

Unable to from url's like http://m.youtube.com/#/watch?v=p9mfw_ZoCFE #484

ghost opened this issue Oct 21, 2012 · 5 comments
Assignees

Comments

@ghost
Copy link

@ghost ghost commented Oct 21, 2012

Youtube rewrites urls like this
http://m.youtube.com/#/watch?v=p9mfw_ZoCFE to this
http://m.youtube.com/watch?v=p9mfw_ZoCFE when accessed from a desktop, removing the #/.

Also, youtube rewrites urls like this
http://m.youtube.com/?reload=3&rdm=mbpn8t3jv#/watch?v=_C-PAEhKa2o to this
http://m.youtube.com/watch?v=_C-PAEhKa2o

However, I noticed youtube-dl is unable to download from urls like the former(I get the error ERROR: Invalid URL:) but is able to download the video from urls like the latter.

Is it possible for the developers to write some logic that performs the same rewrite rule so that those videos can be downloaded without having to manually having to plug them into the browser to get the rewritten url? (That would be awesome!)

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Oct 22, 2012

Uh, this will be a nice trip in regexland...

@ghost
Copy link
Author

@ghost ghost commented Oct 22, 2012

@FiloSottile I'm currently using a regex to parse urls in the form of the above use case before passing the url to youtube-dl, I just thought it would be cool to already have that functionality built in to youtube-dl =)

@ghost ghost assigned phihag Oct 22, 2012
@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Oct 22, 2012

Made it with a single added line to the regex, I hope not to have broken anything ^^
You will have to compile to enjoy it.

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Oct 22, 2012

Oh, noticed now the "assigned" field, I hope not to have duplicated you, @phihag, sorry!

@ghost ghost assigned FiloSottile Oct 22, 2012
@ghost
Copy link
Author

@ghost ghost commented Oct 22, 2012

@FiloSottile Thanks Filippo - As always, you guys are too fast.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.