ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.68k stars 9.97k forks source link

Any way to download trailers from Google Play Movies (https://play.google.com/store/movies) ? #7442

Open dzg opened 8 years ago

dzg commented 8 years ago

If you 'inspect frame source' for the trailer:

<html data-cast-api-enabled="true" data-lava-device-make="" data-lava-device-model="" lang="en">
<head>
<meta charset="utf-8">
<title>Google Play Movies</title>
<link rel="stylesheet" href="https://www.gstatic.com/_/playmovies/_/ss/k=playmovies.pl.15vgkd8zru72d.L.W.O/d=0/rs=AAUEKB8_dysgAEzIf4Yjvtr4B9k1NiITzA">
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,700' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="main">
<div id="player-container" class="player-container no-exit">
</div>
</div>
<script>var _F_jsUrl = "https:\/\/www.gstatic.com\/_\/playmovies\/_\/js\/k\x3dplaymovies.pl.en.KhvJsEE7WTg.O\/m\x3db,cr,cs,csp,ui,wc,f,ln\/rt\x3dj\/d\x3d1\/t\x3dzcms\/rs\x3dAAUEKB91POdacAxuqleyIdoSW9ovMh-Acw";</script>
<script src="https://www.gstatic.com/_/playmovies/_/js/k=playmovies.pl.en.KhvJsEE7WTg.O/m=b,cr,cs,csp,ui,wc,f,ln/rt=j/d=1/t=zcms/rs=AAUEKB91POdacAxuqleyIdoSW9ovMh-Acw">
</script>
</body>
</html>
dstftw commented 8 years ago

Post an example URL.

dzg commented 8 years ago

Example: https://play.google.com/store/movies/details/Man_On_Wire?id=eNqlynceGko

dstftw commented 8 years ago

It should work fine. Post the full output of youtube-dl when run with --verbose option.

dzg commented 8 years ago
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'https://play.google.com/store/movies/details/Man_On_Wire?id=eNqlynceGko']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.10.24
[debug] Python version 2.7.10 - Darwin-14.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.8.1, ffprobe 2.8.1
[debug] Proxy map: {}
[generic] Man_On_Wire?id=eNqlynceGko: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Man_On_Wire?id=eNqlynceGko: Downloading webpage
[generic] Man_On_Wire?id=eNqlynceGko: Extracting information
[download] Downloading playlist: video
[generic] playlist video: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] 5lW6Y0HRyYE: Downloading webpage
[youtube] 5lW6Y0HRyYE: Downloading video info webpage
ERROR: 5lW6Y0HRyYE: YouTube said: This video is not available.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 661, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 291, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1121, in _real_extract
    expected=True, video_id=video_id)
ExtractorError: 5lW6Y0HRyYE: YouTube said: This video is not available.
dstftw commented 8 years ago

You are using an outdated version of youtube-dl. Read our FAQ if you have troubles updating.

jaimeMF commented 8 years ago

I get the same message but I can't watch the video in the browser, if that's also your case there's nothing youtube-dl can do.

dstftw commented 8 years ago

If you can watch it in browser then you are probably affected by issue fixed in 89ea063.

dzg commented 8 years ago

I updated youtube-dl to latest, still same issue. Thing is, I can watch the video in the popup viewer on Play Store, but NOT video 5lW6Y0HRyYE in YouTube.

dstftw commented 8 years ago

Post the --verbose output again to be sure you are using the latest version.

dzg commented 8 years ago
[debug] System config: []
[debug] User config: [u'--recode-video', u'mp4']
[debug] Command-line args: [u'--verbose', u'https://play.google.com/store/movies/details/Man_On_Wire?id=eNqlynceGko']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.11.10
[debug] Python version 2.7.10 - Darwin-14.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.8.1, ffprobe 2.8.1
[debug] Proxy map: {}
[generic] Man_On_Wire?id=eNqlynceGko: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Man_On_Wire?id=eNqlynceGko: Downloading webpage
[generic] Man_On_Wire?id=eNqlynceGko: Extracting information
[download] Downloading playlist: video
[generic] playlist video: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] 5lW6Y0HRyYE: Downloading webpage
[youtube] 5lW6Y0HRyYE: Downloading video info webpage
ERROR: 5lW6Y0HRyYE: YouTube said: This video is not available.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 661, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 290, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1132, in _real_extract
    expected=True, video_id=video_id)
ExtractorError: 5lW6Y0HRyYE: YouTube said: This video is not available.
dzg commented 8 years ago

To clarify, if I go to https://play.google.com/store/movies/details/Man_On_Wire?id=eNqlynceGko and click the big PLAY button, I can watch the trailer.

But if I go to https://www.youtube.com/watch?v=5lW6Y0HRyYE I get "This video is not available."

dzg commented 8 years ago

Looks like it's a regional thing. When I turned on my HotSpot shield VPN, it worked fine.

dstftw commented 8 years ago

It works in Chrome even when geo restricted (media is delivered differently) but not in Firefox.

remitamine commented 8 years ago

works fine for me:

youtube-dl -F https://play.google.com/store/movies/details/Man_On_Wire?id=eNqlynceGko
[generic] Man_On_Wire?id=eNqlynceGko: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Man_On_Wire?id=eNqlynceGko: Downloading webpage
[generic] Man_On_Wire?id=eNqlynceGko: Extracting information
[download] Downloading playlist: video
[generic] playlist video: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] 5lW6Y0HRyYE: Downloading webpage
[youtube] 5lW6Y0HRyYE: Downloading video info webpage
[youtube] 5lW6Y0HRyYE: Extracting video information
WARNING: video doesn't have subtitles
[youtube] 5lW6Y0HRyYE: Downloading MPD manifest
[info] Available formats for 5lW6Y0HRyYE:
format code  extension  resolution note
171          webm       audio only DASH audio  119k , vorbis@128k (44100Hz), 1.66MiB
140          m4a        audio only DASH audio  130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 1.93MiB
278          webm       256x144    DASH video   88k , webm container, vp9, 12fps, video only, 1009.23KiB
160          mp4        256x144    DASH video  113k , avc1.42c00c, 12fps, video only, 1.60MiB
242          webm       426x240    DASH video  202k , vp9, 24fps, video only, 2.02MiB
133          mp4        426x240    DASH video  251k , avc1.4d4015, 24fps, video only, 3.58MiB
243          webm       640x360    DASH video  355k , vp9, 24fps, video only, 3.66MiB
134          mp4        640x360    DASH video  583k , avc1.4d401e, 24fps, video only, 5.43MiB
244          webm       854x480    DASH video  665k , vp9, 24fps, video only, 6.50MiB
135          mp4        854x480    DASH video 1106k , avc1.4d401e, 24fps, video only, 11.74MiB
247          webm       1280x720   DASH video 1618k , vp9, 24fps, video only, 14.58MiB
136          mp4        1280x720   DASH video 2264k , avc1.4d401f, 24fps, video only, 23.88MiB
248          webm       1920x1080  DASH video 3386k , vp9, 24fps, video only, 28.02MiB
137          mp4        1920x1080  DASH video 4306k , avc1.640028, 24fps, video only, 48.19MiB
256          m4a        audio only  194k , mp4a.40.5, 2.89MiB
258          m4a        audio only  386k , mp4a.40.2, 5.73MiB
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
59           mp4        854x480    large , avc1.4D001F,  mp4a.40.2@128k
78           mp4        854x480    medium , avc1.4D001F,  mp4a.40.2@128k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)