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

Adds support for passing a referer. #801

Merged
merged 2 commits into from Apr 26, 2013
Merged

Adds support for passing a referer. #801

merged 2 commits into from Apr 26, 2013

Conversation

ghost
Copy link

@ghost ghost commented Apr 24, 2013

I noticed that Vimeo supports embedding videos that only can be accessed when watched via a specified domain. To enable users to download these videos, I added referer passing to youtube-dl. This way you can pass the required referer url to youtube-dl and the video download will succeed.

@jaimeMF
Copy link
Collaborator

jaimeMF commented Apr 24, 2013

Could you post an example video?

@ghost
Copy link
Author

ghost commented Apr 24, 2013

Yes, this video:
http://player.vimeo.com/video/36845416

Can only be embedded here:
http://guru.ijoomla.com/easyblog/entry/how-to-keep-your-videos-private-with-vimeo/

youtube_dl bjorn$ ./main.py http://player.vimeo.com/video/36845416
[vimeo] 36845416: Downloading webpage
[vimeo] 36845416: Extracting information
ERROR: unable to extract info section

youtube_dl bjorn$ ./main.py http://player.vimeo.com/video/36845416 --referer http://guru.ijoomla.com/easyblog/entry/how-to-keep-your-videos-private-with-vimeo/
[vimeo] 36845416: Downloading webpage
[vimeo] 36845416: Extracting information
[vimeo] 36845416: Downloading H264 file at hd quality
[download] Destination: 36845416.mp4
[download] 100.0% of 9.66MiB at 409.51KiB/s ETA 00:00

@jaimeMF
Copy link
Collaborator

jaimeMF commented Apr 25, 2013

Ok, it works.
Apart from inspecting the html source of the page, is there some method for getting the video link?
By the way, the video title is quite ironic.

@ghost
Copy link
Author

ghost commented Apr 25, 2013

No, that would require traversing the HTML page. I tested youtube-dl on a random page with a embedded youtube video and in that case the video does not download either. Downloading embedded videos via random urls would be a separate feature imho.

I found this piece of text especially amusing "Today, I will explain how to keep your videos private so that no one can download them or find them on other websites." :)

@jaimeMF
Copy link
Collaborator

jaimeMF commented Apr 25, 2013

I meant what a user can do when he find that page, since there's no direct link to the video.
And yes, searching embedded videos could help, but that's a separate issue.

@jaimeMF
Copy link
Collaborator

jaimeMF commented Apr 25, 2013

And you have fixed #397, well done!

@ghost
Copy link
Author

ghost commented Apr 25, 2013

Awesome :) A user would need to look at the html source of the page to find the link, yes.

@FiloSottile
Copy link
Collaborator

Can't we give some meaningful error message?
And maybe I would also explain what it's for in --help, like "for domain restriction" (worded better)...

@jaimeMF
Copy link
Collaborator

jaimeMF commented Apr 25, 2013

Yes, without the --refereroption the received webpage contains the string: "The creator of this video has not given you permission to embed it on this domain.". Is ERROR: The author has restricted the access to this video, try with the "--referer" option a good message?

@ghost
Copy link
Author

ghost commented Apr 25, 2013

Yeah, that seems like a good message. Shall I try to implement this or do you think you can add this yourself easily?

@jaimeMF
Copy link
Collaborator

jaimeMF commented Apr 26, 2013

No, I've already implemented this, unless someone wants something else, I'll merge it today.

@ghost
Copy link
Author

ghost commented Apr 26, 2013

Great 👍

@jaimeMF jaimeMF merged commit 59cc5d9 into ytdl-org:master Apr 26, 2013
@jaimeMF
Copy link
Collaborator

jaimeMF commented Apr 26, 2013

Merged, thanks!

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

Successfully merging this pull request may close these issues.

3 participants