Voldrix / onlyfans-dl-2

OnlyFans content downloader v2
GNU General Public License v3.0
148 stars 23 forks source link

Is anyone going to figure out a way around the DRM issue? #87

Open deadbeatdandylyon opened 1 year ago

deadbeatdandylyon commented 1 year ago

Okay so I don't know if anyone else has ran into this yet. I currently use "onlyfans-dl" version 2 for scraping as mentioned previously and the old google extension "Downloader for onlyfans"

There is an account i'm subscribed to

Since April 30th - it seems that's when she turned on DRM protection. as since then any new video I haven't been able to scrape or download. When I have tried to scrape her profile I get the following message and as we know the download button through the "downloader for onlyfans" extension is no longer showing up on these

Screenshot 2023-05-04 182812

However today 05/04/2023 - she just posted a video and I now have the download video option through the browser extension, I am also able to right click on the video with the "enable right click extension" and it does have an option to download a video, so if my assumption is correct she "may" have turned her DRM protection off and was able to download the video without issue.

However when I attempted to run the onlyfans-dl scraper i still get the same error message above, as well as I noticed the scraper is not scraping even the new images as well

So my assumption is that if a creator turns on DRM and then at a later point turns DRM off it seems at least with this partcular scraper i still can't scrape. I would assume that if a creator turns off DRM all should be good with scraping.

if anyone else is able to replicate the same occurrence i am curious, i don't have any other scrapers that I can test with to see if it's just failing with this one specific scraper or if its happen across all that if a creator turns on DRM and then turns DRM off if all scrapers still can't scrape.

just thought i would post an update of my experience today

ckanders2020 commented 1 year ago

i am having the same issue

deadbeatdandylyon commented 1 year ago

A lot of people are having the same problem with all the different variations of scrapers and downloading tools. Screen recording works for now. and I'm sure in due time one of the many people that do scrapers well find a work around but for now we just have to stay put, i'm surprise there hasn't been no update on this repository though, hang in there i'm sure it will get resolved eventually

razzm8 commented 1 year ago

having same issue also

deadbeatdandylyon commented 1 year ago

Until Voldrix fixes or updates, there is another script that is currently working by someone else

Voldrix commented 1 year ago

I haven't been able to find a creator with this DRM issue to reproduce this problem. Message me an example I can test.

deadbeatdandylyon commented 1 year ago

There is a huge list of people that have DRM currently on, I don't know how to privately message you - but this person has a free account stefbabyg - any video post from 04/29/2023 when you go to download it get stuck and for me at least is what screen i posted at the very top of the page once DRM is turned on i just gets stuck,

deadbeatdandylyon commented 1 year ago

@Voldrix

So I decided to run the script again with another creator name jennarosexovip as I am paying for her sub for the month. as of May 5th she turned her DRM protection on. She has a video on May 5th, and today May 8th. As you can see by the following image below, no videos are being downloaded past April 30th - (only two new videos were posted by then) However as you can see with the images from the photos those are able to download without any problems even with DRM on as the DRM is only preventing further videos from being downloaded.

Video Screen shot below

Screenshot 2023-05-08 134406

Image screen shot below

Screenshot 2023-05-08 134605

Below is what happened with the script same as the very first post

Screenshot 2023-05-08 134720

I also found out as previously mentioned if they turn their DRM off for whatever reason the script still acts like this and doesn't download anything past the first DRM video. hope this information helps as well,

Voldrix commented 1 year ago

thanks for the reference account, with that I was able to find what was going wrong, just a weird Python issue that apparently only crops up with that type of DRM content. I pushed a fix. Works for me on the account you posted. LMK if you still have issues, otherwise go ahead and close out the issue.

Voldrix commented 1 year ago

hold on there's one more issue I just found.

Voldrix commented 1 year ago

okay the DRM issue is going to take me a bit. In the meantime, I set the script to just download the preview image if DRM is enabled so that the script won't crash, and you get a placeholder image for the video.

deadbeatdandylyon commented 1 year ago

@Voldrix is there anything new I need to do with the script because i'm still getting the same error message with the script as before, do I need to update anything

Voldrix commented 1 year ago

Was the error coming from downloading posts or messages? I just did some testing with messages, and found the source URL for a vid can some times be in a different field. I just added fallback support to check for it. Try the latest change.

deadbeatdandylyon commented 1 year ago

Was the error coming from downloading posts or messages? I just did some testing with messages, and found the source URL for a vid can some times be in a different field. I just added fallback support to check for it. Try the latest change.

I'm not sure how to read the below image to know if it's coming from a post or not, i'm assuming a post as i haven't received any videos in my message inbox,

I am trying a download for another user today to see if it still happens, but curious every time you make a change do I need to keep re downloading the zip file or just re run the script?

image


Okay so I attempted to download another profile jozyblows, who has her DRM turn on - got the following script error below, and noticed that it's not downloading any photos after 04/30/2023 however there are plenty new photos, also even those that Messages are set to true - it's not downloading anything in the message folder or paid messages.

image

image

image

So not sure where I should go from here?

Voldrix commented 1 year ago

The script does not update itself. You need to download the new version.

pawnstar81 commented 1 year ago

I spent yesterday trying to figure out the DRM issue. No luck, but I did find some things out.

Looking at the media on each post, if DRM is used there is no source within the source node. Instead the media is under a files node.

Under files there is a DRM node containing the manifest url for both DASH and HLS implementations, and a set of signatures for both DASH and HLS implementations (the signature is different for DASH/HLS). The signatures node contains the following: CloudFront-Key-Pair-Id CloudFront-Policy CloudFront-Signature

These 3 items need to be passed with the cookies in order to retrieve the manifest. I opted for HLS as I'm not too familiar with DASH. This may have been a mistake though all the browser's that I've tried seem to use DASH.

Once the manifest (.m3u8) has been retrieved it points to variant manifests - e.g. _720.m3u8, _original.m3u8. Pick the _original one, and request it from the same path as the initial manifest. Again, you need to send the CloudFront cookies or the request will fail.

This manifest then provides the details of the .ts file and the encryption details: (a couple of bits REMOVED as I'm not sure whether they can be tracked back to my account id)

#EXT-X-VERSION:5
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd:///REMOVED==",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1",IV=REMOVED
#EXTINF:3,
#EXT-X-BYTERANGE:3103316@0
0hdm9sxsdngp870wedzt4_source.ts
#EXTINF:3,
#EXT-X-BYTERANGE:3319892@3103316
0hdm9sxsdngp870wedzt4_source.ts
#EXTINF:3,
#EXT-X-BYTERANGE:3319516@6423208
0hdm9sxsdngp870wedzt4_source.ts
#EXTINF:3,
#EXT-X-BYTERANGE:3683108@9742724
0hdm9sxsdngp870wedzt4_source.ts
#EXTINF:3,
#EXT-X-BYTERANGE:3440400@13425832
0hdm9sxsdngp870wedzt4_source.ts
#EXTINF:3,
....

This is where I get stuck. I've tried the m3u8_To_MP4 sending across the same headers, including the cloudfront cookies. I've also tried calling ffmpeg and passing them too. I'm sure that I'm missing something really simple, but I haven't been able to go through the process HLS process in Chrome dev mode to see what's happening. I may try again using DASH when I get a bit of time.

deadbeatdandylyon commented 1 year ago

The script does not update itself. You need to download the new version.

Thanks for that information, after downloading the new zip everything worked, and I do see where you have set it to replace all DRM with the image placement as you mentioned previously. so all is good for the time being. keep us updated and thank you for your hard work

deadbeatdandylyon commented 1 year ago

@Voldrix I came across a script that's working with DRM downloads, I don't know the rules of cross posting in other peoples githubs so I don't know if it's okay to pos there information in here.

pawnstar81 commented 1 year ago

@Voldrix I came across a script that's working with DRM downloads, I don't know the rules of cross posting in other peoples githubs so I don't know if it's okay to pos there information in here.

Is that the .net console app that you've opened issues on recently? I mainly work on .net code so if it is I may get a better understanding as to how it works.

deadbeatdandylyon commented 1 year ago

@Voldrix I came across a script that's working with DRM downloads, I don't know the rules of cross posting in other peoples githubs so I don't know if it's okay to pos there information in here.

Is that the .net console app that you've opened issues on recently? I mainly work on .net code so if it is I may get a better understanding as to how it works.

I believe it is, I just don't know the rules with github if it's okay to share other peoples platforms, i don't want to take credit from anyone person and send it to another but if its okay to say so then I will, and maybe with the help of that platform someone can work on this one as well? i just don't want to step on any toes

deadbeatdandylyon commented 1 year ago

has there been any update on this scraper?

pawnstar81 commented 1 year ago

I had a look at the previously mentioned script. It looks like it uses the api located at https://cdrm-project.com/ in order to get the decryption key. I've only glanced through the code so far, haven't had a chance to try it. There is also a python script available on that site, which I think it just a wrapper around the api (documentation is lacking). I'm busy this week and then on holiday for 2 weeks. When I get back I'll try to find some time to look further into it and if it does work then it shouldn't be too difficult to implement in python.

deadbeatdandylyon commented 11 months ago

any update on this just curious?

Voldrix commented 11 months ago

Circumventing the widevine encryption will require pywidevine, mp4decrypt, ffmpeg, and possibly a leaked widevine key from Android Studio Emulator. A couple other scrapers have implemented this. It may be worth referencing their implementation.

pawnstar81 commented 6 months ago

Ok, so this is interesting. I can't find anything about it online yet but I looks like OF may have disabled DRM globally. I'd modded my script to let me know if any videos had DRM enabled when downloaded, that way I could add the profile to a list which I downloaded using the other (.NET) scraper (which I'd modified to just download DRM protected content).

Today I noticed that the script wasn't reporting back any profiles.

I also noticed that I seemed to be using quite a bit of disk space compared to yesterday.

Looking at a profile I know was heavily DRM protected I can now see that this script is downloading videos that had previously been downloaded by the other scraper.

Frustratingly though, I now need to find a way to dedupe these files and get some of my disk space back.

pawnstar81 commented 6 months ago

Ok, so this is interesting. I can't find anything about it online yet but I looks like OF may have disabled DRM globally. I'd modded my script to let me know if any videos had DRM enabled when downloaded, that way I could add the profile to a list which I downloaded using the other (.NET) scraper (which I'd modified to just download DRM protected content).

Today I noticed that the script wasn't reporting back any profiles.

I also noticed that I seemed to be using quite a bit of disk space compared to yesterday.

Looking at a profile I know was heavily DRM protected I can now see that this script is downloading videos that had previously been downloaded by the other scraper.

Frustratingly though, I now need to find a way to dedupe these files and get some of my disk space back.

And today there are profiles with DRM protected content again :-(

razzm8 commented 6 months ago

Ok, so this is interesting. I can't find anything about it online yet but I looks like OF may have disabled DRM globally. I'd modded my script to let me know if any videos had DRM enabled when downloaded, that way I could add the profile to a list which I downloaded using the other (.NET) scraper (which I'd modified to just download DRM protected content).

Today I noticed that the script wasn't reporting back any profiles.

I also noticed that I seemed to be using quite a bit of disk space compared to yesterday.

Looking at a profile I know was heavily DRM protected I can now see that this script is downloading videos that had previously been downloaded by the other scraper.

Frustratingly though, I now need to find a way to dedupe these files and get some of my disk space back.

any good duplicate file finder should pick them up, as the base info of the file will be the same, from there you can select the oldest/newest variant of each file to remove