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

Defaul Referer #1854

Closed
sirinath opened this issue Nov 29, 2013 · 8 comments
Closed

Defaul Referer #1854

sirinath opened this issue Nov 29, 2013 · 8 comments

Comments

@sirinath
Copy link

@sirinath sirinath commented Nov 29, 2013

Is it possible to add a default referer which is the site name. If using you tube it will be youtube.com. If vimeo it will be vimeo.com

@phihag
Copy link
Contributor

@phihag phihag commented Nov 29, 2013

Do you really mean an HTTP referer header in the download request? I see little use for that, why would you want one? Note that you can embed the extractor in the filename, simply add an output template with %(extractor)s in it, as in

$ youtube-dl  -o '%(extractor)s-%(title)s-%(id)s.%(ext)s' --get-filename 3r8Rzr08oSU
youtube-Linked List in a File 5 (using Scala)-3r8Rzr08oSU.mp4
@phihag
Copy link
Contributor

@phihag phihag commented Dec 17, 2013

I'm closing this issue now since I'm fairly certain that you wanted -o %(extractor)s. Please comment if that is not the case.

@phihag phihag closed this Dec 17, 2013
@sirinath
Copy link
Author

@sirinath sirinath commented Dec 17, 2013

Some sites are defensive if the the referrer is not within the site. So it may be helpful if YTDL mimics a user clicking URLs trough a browser to navigate the site so that some protection mechanism is not triggered.

Items to mimic:

  1. Referer
  2. User agent
  3. Cookies
@phihag
Copy link
Contributor

@phihag phihag commented Dec 17, 2013

Sorry, it looks like I completely misunderstood your request. We are already sending the referer, user-agent and cookies headers, since one of the very first versions of youtube-dl. If there is a specific problem, feel free to report it.

@DrMcCoy
Copy link

@DrMcCoy DrMcCoy commented Nov 18, 2015

I'd very much like a CLI argument to explictly set the HTTP referer.

Vimeo, for example, has a setting where uploaders can say that a video is only accessible through an embed from a specific domain. They check that by looking at the referer; I often run into problems there because I have referer disabled by default through the Firefox extension RefControl.

@DrMcCoy
Copy link

@DrMcCoy DrMcCoy commented Nov 18, 2015

And if you want an example, this video here is where I ran into it just now.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 19, 2015

@DrMcCoy Have you tried the --referer option? If that doesn't work, open a new issue.

@DrMcCoy
Copy link

@DrMcCoy DrMcCoy commented Nov 19, 2015

Oh, you're right, this is exactly what I asked for. And it works, too. My bad! :)

Seems like my system's manpage for youtube-dl is outdated, and so the option wasn't listed there when I checked.

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
4 participants
You can’t perform that action at this time.