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 download video from youtube #1746

Closed
shirishag75 opened this issue Nov 10, 2013 · 5 comments
Closed

Unable to download video from youtube #1746

shirishag75 opened this issue Nov 10, 2013 · 5 comments
Labels
bug

Comments

@shirishag75
Copy link

@shirishag75 shirishag75 commented Nov 10, 2013

Hi all,
This is my youtube-dl version :-

 $ youtube-dl --version
    2013.10.23

This is the video I was trying to download, in fact many episodes of Crime Patrol show the following :-

 $ youtube-dl -F yZIXLfi8CZQ
   [youtube] Setting language
   [youtube] yZIXLfi8CZQ: Downloading video webpage
   [youtube] yZIXLfi8CZQ: Downloading video info webpage
   [youtube] Confirming age
   ERROR: YouTube said: This video contains content from Multi Screen Media, who has blocked it from display on this website.<br/><u><a href='http://www.youtube.com/watch?v=yZIXLfi8CZQ&feature=player_embedded' target='_blank'>Watch on YouTube</a></u>

Looking forward to know how to do it right if there is a way ?

@bluesangel
Copy link

@bluesangel bluesangel commented Nov 17, 2013

Did you try to simulate a web browser ?
with 2013.11.15 :
youtube-dl --user-agent 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5' -F yZIXLfi8CZQ
gives
[youtube] Setting language
[youtube] yZIXLfi8CZQ: Downloading video webpage
[youtube] yZIXLfi8CZQ: Downloading video info webpage
[youtube] yZIXLfi8CZQ: Extracting video information
WARNING: unable to extract uploader nickname
Available formats:
18 : mp4 [360x640]
43 : webm [360x640]
5 : flv [240x400]
36 : 3gp [240x320]
17 : 3gp [144x176]
135 : mp4 [480p](DASH Video)
134 : mp4 [360p](DASH Video)
133 : mp4 [240p](DASH Video)
160 : mp4 [192p](DASH Video)
141 : m4a [256k](DASH Audio)
140 : m4a [128k](DASH Audio)
139 : m4a [48k](DASH Audio)
I guess you just miss --user-agent option :)

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 17, 2013

@bluesangel the option for setting the user agent should not be needed for downloading videos. You can see the default user agent by running youtube-dl --dump-user-agent (currently it's Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0 (Chrome)), so I guess that on mobile browsers they don't block the content.

@shirishag75
Copy link
Author

@shirishag75 shirishag75 commented Nov 18, 2013

For some reason the first one worked exactly liked bluesangel shared.

If I try the normal way the same thing as before happens.

So basically to get around it I have to simulate the apple browser.

Is there a way to fix the user-agent as in changing the user-agent simulation permanently ?

@phihag
Copy link
Contributor

@phihag phihag commented Nov 18, 2013

Changing the user-agent just exploits a bug of YouTube. We should request the correct URL in the first place.

@phihag phihag closed this in fccd377 Nov 18, 2013
phihag added a commit that referenced this issue Nov 18, 2013
@phihag
Copy link
Contributor

@phihag phihag commented Nov 18, 2013

This has been fixed in youtube-dl 2013.11.18. I also stuck in the iPhone UA for good measure. Type sudo youtube-dl -U to update.

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.