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
132.49k stars 10.05k forks source link

Amazon? #1753

Closed lysdexia closed 2 years ago

lysdexia commented 11 years ago

$ youtube-dl -ct http://www.amazon.com/gp/product/B001FCK5GG/ref=avod_yvl_watch_now [redirect] Following redirect to http://www.amazon.com/Worlds-Fastest-Indian-Anthony-Hopkins/dp/B001FCK5GG WARNING: Falling back on generic information extractor. [generic] B001FCK5GG: Downloading webpage [generic] B001FCK5GG: Extracting information ERROR: Unsupported URL: http://www.amazon.com/Worlds-Fastest-Indian-Anthony-Hopkins/dp/B001FCK5GG; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update. doug@thebadpipsissewah:~$ youtube-dl -ct --verbose http://www.amazon.com/gp/product/B001FCK5GG/ref=avod_yvl_watch_now [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['-ct', '--verbose', 'http://www.amazon.com/gp/product/B001FCK5GG/ref=avod_yvl_watch_now'] [debug] youtube-dl version 2013.11.07 [debug] Python version 2.7.5+ - Linux-3.11.0-13-generic-x86_64-with-Ubuntu-13.10-saucy [debug] Proxy map: {} [redirect] Following redirect to http://www.amazon.com/Worlds-Fastest-Indian-Anthony-Hopkins/dp/B001FCK5GG WARNING: Falling back on generic information extractor. [generic] B001FCK5GG: Downloading webpage [generic] B001FCK5GG: Extracting information ERROR: Unsupported URL: http://www.amazon.com/Worlds-Fastest-Indian-Anthony-Hopkins/dp/B001FCK5GG; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update. Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 348, in extract_info ie_result = ie.extract(url) File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 125, in extract return self._real_extract(url) File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 212, in _real_extract raise ExtractorError(u'Unsupported URL: %s' % url) ExtractorError: Unsupported URL: http://www.amazon.com/Worlds-Fastest-Indian-Anthony-Hopkins/dp/B001FCK5GG; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.

jaimeMF commented 11 years ago

We won't add support for downloading for downloading a full movie if you have to pay for accessing it. But we would look to downloading the trailers (if they have them, I haven't seen it).

phihag commented 11 years ago

@jaimeMF Why not? I see nothing wrong with downloading a movie the user bought. You'll just have to pass in --username and --password.

jaimeMF commented 11 years ago

Sorry, I didn't think about that option, I've no problem then.

github18 commented 9 years ago

Anyone feel like working on this? I have Amazon prime and the streaming player is painful to use. Seeking back takes like 5-10 secs each use!

If someone feel like making downloading of streaming video's on Amazon work I would be happy to assist with beta testing. I am a Linux administrator and have some experence coding though not much with Python.

I could also offer a case of your favorite beverage* or gift card upon completion.+

* Provided its within reason

iggyvolz commented 9 years ago

I could take a whack at it but:

That being said - I'll give it a go.

github18 commented 9 years ago

Sounds good, let me know if I can help in any way.

github18 commented 9 years ago

I forked the youtube-dl repo and started poking at this a bit. I am not sure how to go about making login work though. Is there a simple extractor with login somewhere to look at? I have been poking at the youtube one but its really long to try and read through. I am not sure how to deal with the cookies and put them back into whatever youtube-dl uses. Whats the normal practice in making logins work? I assume there must be some debugging option in youtube-dl that will show you cookies its getting and such? I have not figured out how to make python print the cookie(s) yet. Also is there a good way to view each webpage in the login process? I have just been printing things and piping them into files for viewing but thats a little painful.

I looked at http://stackoverflow.com/questions/18265376/why-i-can-log-in-amazon-website-using-python-mechanize-but-not-requests-or-urll however I am not sure how to integrate that into youtube-dl.

Any hints would be appreciated.

dstftw commented 9 years ago

@github18 for login implementation you can consult crunchyroll, facebook, noco, twitch, udemy or any other extractor with _login method inside. For debugging you may use --print-traffic and --write-pages for dumping webpages. You can alternatively provide account credentials to one of the developers.

bouchard commented 9 years ago

Some episodes of Amazon TV are available without login (a.k.a. free for a limited time). I would suggest getting it to work with these episodes first, and then working on login?

For example, the new New Yorker show, first episode is free: http://www.amazon.com/gp/product/B00RR12NFK/ref=atv_terms_dp

bouchard commented 9 years ago

Putting a sniffing proxy in front of Amazon Video while watching, you can get the Cloudfront URL where the video is sourced from (should be a file ending in .ism). Silverlight connects to Cloudfront using the Microsoft IIS Smooth Streaming Protocol.

#!/usr/bin/env ruby

require 'net/http'

# Microsoft IIS Smooth Streaming Protocol: http://msdn.microsoft.com/en-us/library/ff469334.aspx

def video_segment_url(byte_offset)
  "http://ds79lt46qzmj0.cloudfront.net/0/9/3/09366c76-aa8a-44f3-8f53-a97fc745ae5c/8911e9dc-8894-4ad0-96f2-160709d75152.ism/QualityLevels(300000)/Fragments(video=#{byte_offset})"
end

def audio_segment_url(byte_offset)
  "http://ds79lt46qzmj0.cloudfront.net/0/9/3/09366c76-aa8a-44f3-8f53-a97fc745ae5c/8911e9dc-8894-4ad0-96f2-160709d75152.ism/QualityLevels(128000)/Fragments(audio_AACL_128k=#{byte_offset})"
end

A (broken) implementation of a downloader is at https://github.com/ReneVolution/smoothget/, hopefully easy to fix and implement for someone? I'd appreciate some help, I'm happy to do the heavy lifting as needed if someone can point me in the right direction.

c0deous commented 8 years ago

Has any progress been made on this? I have a massive movie collection on Amazon and I wanted to put it on my Plex server. From what I am hearing it is:

1) Possible to Login to Amazon with Python 2) Possible to download ISM videos with ismdownloader (for windows but meh)

Youtube-dl is a fantastic tool. It would be even more fantastic if this were implemented :)

remitamine commented 8 years ago

they have multiple formats(DASH, SmoothStreaming, HLS, MP4, WMV, MPEGPS, MPEGTS) and DRM protection(PlayReady, FlashAccess, Widevine2, Marlin, FairPlay, CENC). i tried only to download DASH formats on a trailer and it works, but for full content they use DRM.

murphy-edwards commented 8 years ago

Someone was able to figure out the Widevine DRM on amazon: https://github.com/liberty-developer/inputstream.mpd

This is a Kodi plugin that provides DASH streams that are encrypted with widevine. Look at wvdecrypter. It uses the widevineCDM library that chrome provides to decrypt the videostream.

jubalh commented 7 years ago

Any news on this one?

DJD-Code-Studio commented 7 years ago

There is only one Firefox extension Video Download Helper which is able to identify all the video resolutions of Amazon Prime Video and download them. But it uses the native downloader of Firefox which sucks. It is painfully slow. But it works.

So for now that is the only option for Amazon Prime Videos.

antonio8909 commented 7 years ago

@DJD-Code-Studio That doesn't work. It detect the video in parts.

DJD-Code-Studio commented 7 years ago

@antonio8909

Yes, it detects the video in parts but if you allow the extension a few minutes after the streaming has started, it detects the full file.. If you click on the icon, you will see a list of various options of gradually increasing sizes. Select the highest or the second highest one. It would contain the entire video. But it will use the native downloader of FF. The best I have see is to allow the video to run for 5 minutes ( say for a full length movie) and then if I check the options listed by the extension I get the desired size.

Hope this helps !

antonio8909 commented 7 years ago

Ok. I'll try and report the results @DJD-Code-Studio

jmcree commented 7 years ago

@antonio8909 @DJD-Code-Studio From what I've been reading and experimenting with, although that plug-in finally detects the full file, the video is no good.

Tatsh commented 6 years ago

Just so everyone knows, wvdecrypter source is here now https://github.com/peak3d/inputstream.adaptive

shadowzoom commented 6 years ago

Anybody got luck to download amazon DRM videos? I've tried every step from this thread but with no luck

Tatsh commented 6 years ago

How any of these sites are being ripped from is not public information and probably never will be.

ghoshben commented 6 years ago

widevine decrypter is here https://github.com/tsukasachandesu/video_decrypter

Youtube-dl pls support (At least)downloading drm protected dash in any form (encrypted so that we can decrypt it manually or Decrypted 😀 )

shadowzoom commented 6 years ago

@ghoshben i've tried to install it, without luck... So hard. It would be great if someone can merge it with yt downloader!

robot00f commented 6 years ago

@ghoshben Sadly, that doesn't work as I read kametsu.

antonio8909 commented 6 years ago

I don't think that this will be merged into yt-dl

shadowzoom commented 6 years ago

Why https://github.com/tsukasachandesu/video_decrypter was deleted?

Tatsh commented 6 years ago

Threats from lawyers who don't understand open source.

shadowzoom commented 6 years ago

Damn.. Tatsh, do you know forums where i can find it?

robot00f commented 6 years ago

https://github.com/dheeraj-rn/video_decrypter

jubalh commented 6 years ago

Hopefully someone can base some work on this nice effort. Just sad that it requires Windows so far.

sundelirajesh commented 6 years ago

https://github.com/dheeraj-rn/video_decrypter

How to use this program?

IDerr commented 5 years ago

I repost the new link for info https://github.com/CrackerCat/video_decrypter

shadowzoom commented 5 years ago

@IDerr can you please write mini guide how to use it after compilation? Do this please when you will be have free time, thanks so much in advance

vapecoder commented 5 years ago

@lDerr I'm also interested in this

HackerBoy0412 commented 5 years ago

Give it a Guide?

F3rn4nd080 commented 5 years ago

I repost the new link for info https://github.com/CrackerCat/video_decrypter

can you explain a little how use? for noobs lol

Anan5a commented 5 years ago

@ghoshben Please explain the arguments of widevine_decrypter

android@Debian-101-buster-64-minimal:~/drm/video_decrypter/widevine_decrypter/src$ ./widevine_decrypter
Syntax : ./widevine_decrypter {encrypted_file} {stream_id} {info_path} {decrypted_path}
double free or corruption (!prev)
Aborted
android@Debian-101-buster-64-minimal:~/drm/video_decrypter/widevine_decrypter/src$ 

I understand {encrypted_file} and {decrypted_path} .But what about {info_path} and {stream_id} ? Please elaborate. also the wiki is dead for some reason!

michaelsmoody commented 4 years ago

@ghoshben Please explain the arguments of widevine_decrypter

android@Debian-101-buster-64-minimal:~/drm/video_decrypter/widevine_decrypter/src$ ./widevine_decrypter
Syntax : ./widevine_decrypter {encrypted_file} {stream_id} {info_path} {decrypted_path}
double free or corruption (!prev)
Aborted
android@Debian-101-buster-64-minimal:~/drm/video_decrypter/widevine_decrypter/src$ 

I understand {encrypted_file} and {decrypted_path} .But what about {info_path} and {stream_id} ? Please elaborate. also the wiki is dead for some reason!

@ghoshben I'm not sure if it's helpful to you, but the source has a directory of python_scripts which you could look at. It has several examples which in my investigation seem to login to a site (site.tv), download, and decrypt.

        os.system('cd "%s" && start widevine_decrypter "%s" %s "%s" "%s"'
                %(os.path.abspath('../widevine_decrypter/src/build'),
                  os.path.abspath('../tmp/_data/'+L[i]), track,
                  os.path.abspath('../tmp/_info'+L[i].split('_')[0]),
                  os.path.abspath('../tmp/_decrypted')))
Anan5a commented 4 years ago

@michaelsmoody the project is useless with latest widevine library

Invictaz commented 3 years ago

@michaelsmoody the project is useless with latest widevine library

Why?

TokugawaHeavyIndustries commented 3 years ago

Why?

it was nuked. https://widevine.rip/

DavidGriffith commented 3 years ago

I don't see anything here to explain what happened, why, or what else can be done to allow for Amazon videos to be downloaded.

TokugawaHeavyIndustries commented 3 years ago

@DavidGriffith I posted above. Widevine was killed off, rendering the workaround unusable. At this time, there are no other known methods.

DavidGriffith commented 3 years ago

@DavidGriffith I posted above. Widevine was killed off, rendering the workaround unusable. At this time, there are no other known methods.

Is this of no use? https://github.com/cryptonek/widevine-l3-decryptor

TokugawaHeavyIndustries commented 3 years ago

@DavidGriffith No. That doesn't work either. Widevine's master keys were changed.

jalotra commented 3 years ago

8 years and this community still hasn't figured a robust-crossplatform method out ?

TokugawaHeavyIndustries commented 3 years ago

@jalotra youtube-dl's primary purpose is not to circumvent Amazon's DRM and encryption. The only reason the Amazon module was added to youtube-dl in the first place was because there was a publically available bypass method (widevine-l3-decryptor).

Again, if there are methods to bypass Amazon's encryption, they aren't public for a reason. Amazon will patch them, rendering all the dev work useless.

InCrIpTiOn commented 3 years ago

(For sigma developers ONLY) - Pirate the movie.