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

Amazon? #1753

Closed
lysdexia opened this issue Nov 12, 2013 · 49 comments
Closed

Amazon? #1753

lysdexia opened this issue Nov 12, 2013 · 49 comments
Labels
DRM site-support-request Add extractor(s) for a new domain

Comments

@lysdexia
Copy link

$ 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
Copy link
Collaborator

jaimeMF commented Nov 12, 2013

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).

@jaimeMF jaimeMF closed this as completed Nov 12, 2013
@phihag
Copy link
Contributor

phihag commented Nov 12, 2013

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

@phihag phihag reopened this Nov 12, 2013
@jaimeMF
Copy link
Collaborator

jaimeMF commented Nov 12, 2013

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

@github18
Copy link

github18 commented Jan 2, 2015

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

  • Provided its done within a reasonable time frame... Say within a month from now?

@iggyvolz
Copy link

iggyvolz commented Jan 2, 2015

I could take a whack at it but:

  • I'm terrible at Python (this will probably amount to a lot of trial-and-error on my part :D)
  • I'm kinda busy over the next couple months
  • Amazon's security department might be over my head.

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

@github18
Copy link

github18 commented Jan 3, 2015

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

@github18
Copy link

github18 commented Jan 3, 2015

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
Copy link
Collaborator

dstftw commented Jan 3, 2015

@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
Copy link

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
Copy link

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
Copy link

c0deous commented Feb 23, 2016

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
Copy link
Collaborator

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
Copy link

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
Copy link

jubalh commented Dec 19, 2016

Any news on this one?

@DJD-Code-Studio
Copy link

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
Copy link

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

@DJD-Code-Studio
Copy link

@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
Copy link

antonio8909 commented Jul 16, 2017

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

@jmcree
Copy link

jmcree commented Jul 18, 2017

@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.

@ytdl-org ytdl-org deleted a comment from nicksds Mar 1, 2018
@ghoshben
Copy link

ghoshben commented Aug 4, 2018

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
Copy link

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

@robot00f
Copy link

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

@antonio8909
Copy link

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

@shadowzoom
Copy link

@Tatsh
Copy link
Contributor

Tatsh commented Aug 31, 2018

Threats from lawyers who don't understand open source.

@shadowzoom
Copy link

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

@robot00f
Copy link

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

@jubalh
Copy link

jubalh commented Sep 3, 2018

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

@sundelirajesh
Copy link

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

How to use this program?

@IDerr
Copy link

IDerr commented Mar 27, 2019

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

@shadowzoom
Copy link

@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
Copy link

@lderr I'm also interested in this

@HackerBoy0412
Copy link

HackerBoy0412 commented Nov 11, 2019

Give it a Guide?

@F3rn4nd080
Copy link

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

can you explain a little how use? for noobs lol

@Anan5a
Copy link

Anan5a commented Nov 20, 2019

@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
Copy link

michaelsmoody commented Apr 27, 2020

@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
Copy link

Anan5a commented Apr 28, 2020

@michaelsmoody the project is useless with latest widevine library

@Invictaz
Copy link

@michaelsmoody the project is useless with latest widevine library

Why?

@TokugawaHeavyIndustries
Copy link

Why?

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

@DavidGriffith
Copy link

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

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

@DavidGriffith
Copy link

@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

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

@jalotra
Copy link

jalotra commented Jul 26, 2021

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

@TokugawaHeavyIndustries

@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
Copy link

(For sigma developers ONLY) - Pirate the movie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRM site-support-request Add extractor(s) for a new domain
Projects
None yet
Development

No branches or pull requests