DIGITALCRIMINAL / ArchivedUltimaScraper

Scrape content from OnlyFans and Fansly
GNU General Public License v3.0
943 stars 39 forks source link

CONFIRMED: Onlyfans DRM Protection for newer videos #983

Open therizzryder opened 1 year ago

therizzryder commented 1 year ago

Well, bad news...

It turns out with this change that you can no longer scrape any new material should someone choose to activate it.

It can STILL scrape the older stuff, but the problem is that they might simply start deleting their old content and repost it.

Well...on the flip-side...they're about to witness a drastic revenue drop lol.

avekifes commented 1 year ago

Well...on the flip-side...they're about to witness a drastic revenue drop lol.

You seem to have forgotten that we live in clown world, and simps will pay for just about anything.

Bearded-Beard commented 1 year ago

This is going to suck..... for a lot of creators, sure whales exist and will continue to buy, but as soon as I can't get a copy of content I buy, I'll unsub, I don't rip to upload elsewhere, all for personal use like a huge % of people who use this.

CannotTouch commented 1 year ago

i still don't have understand if the hang on "Processing Scraped Messages" is for DRM or for a bug :D it's over a month that i'm not able to scrape anything :p

PsychoSid commented 1 year ago

I don't think it's the DRM I use an old backup and that works for me. It's just the newest commits/updates that don't work for me (I don't have much to scrape though) so anything the new thing "fixed" didn't affect me anyway.

deadbeatdandylyon commented 1 year ago

hmm I wonder if anyone has any works on working around this. but I'm like @Bearded-Beard i downloaded the stuff for my own personal collection

OFfriend commented 1 year ago

The DRM (widevine) is broken and can be circumvented. In my opinion, it is only meant to reduce the automated leaks of smaller models so that more people will pay for content. People can still take screenshots or just bypass the DRM (android phone/tablet + pywidevine + mp4decrypt). This means that larger models are still subject to automated leaks. So this protection doesn't prevent leaks and doesn't protect models!

The bottom line is that it's as easy as downloading a netflix movie. (possible). That said, i will stay out of the development of tools and scripts.

misterscraper commented 1 year ago

can you post a workaround for the DRM protected content?

valdearg commented 1 year ago

What happens when you hit the DRM protected content? I'm currently stuck running the same model:

Processing Scraped Stories
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:00<00:00, 4570.98it/s]
Processing metadata.
sia_siberia: Renaming files.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 31/31 [00:00<00:00, 5162.94it/s]
Processing Scraped Posts
  0%|                                                                                                                                                         | 1/3970 [00:01<1:12:45,  1.10s/it] 
spiderzero3 commented 1 year ago

What happens when you hit the DRM protected content? I'm currently stuck running the same model:

Processing Scraped Stories
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:00<00:00, 4570.98it/s]
Processing metadata.
sia_siberia: Renaming files.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 31/31 [00:00<00:00, 5162.94it/s]
Processing Scraped Posts
  0%|                                                                                                                                                         | 1/3970 [00:01<1:12:45,  1.10s/it] 

It's happening to you. The script tries to download videos as usual, but the DRM has changed the file delivery method so it won't work. It gets stuck indefinitely.

god43 commented 1 year ago

the old commits work fine, i am using 7.6.1 for scraping paid content and messages.

lightninghydra24 commented 1 year ago

@god43 DRM is currently on an opt-in basis - so not turned on immediately for all creators - and also only for newer videos they upload if turned on. So if you're scraping a creator that doesn't have that option on (yet?) or hasn't uploaded new content you should be fine.

Unsure if OnlyFans plans to go back and protect their older videos with DRM but it would unfortunately make sense for them to do that at some point.

It looks like they're cautioning rolling it out for everyone at the moment: "DRM Protection may limit the ability of fans using older devices to view this video content." (via twitter) but that could change in future.

lightninghydra24 commented 1 year ago

NB: I have heard of creators talking about deleting and reposting all their old videos so they're protected with DRM so.. do with that what you will.

deadbeatdandylyon commented 1 year ago

Also make note that even if they turn on drm for a few days the turn it off once there is just one drm video no scrape tool will be able to scrape past that one drm video even if they turn it off, found that out the hard way

PsychoSid commented 1 year ago

As @god43 suggests I am using an old commit so it's odd that if it's DRM that's "breaking" it how does older versions still work just fine to download all. If DRM was on then it would stop for all versions I would expect ?

OFfriend commented 1 year ago

NB: I have heard of creators talking about deleting and reposting all their old videos so they're protected with DRM so.. do with that what you will.

Creators can't delete videos you've paid for. Because Amazon cloudstorage is fucking expensive, OF has implemented an upload check and can dectect if someone uploads the same video/image again. You can't upload the same file again! And I'm not sure if OF really deletes older files because deleting files cost also money.

Adding DRM to older files cost them too much money. Because they have to re-encode each film, they need a lot of CPU and storage to read/write. And then they have to delete the old files. It all costs them money.

avekifes commented 1 year ago

OF has implemented an upload check and can dectect if someone uploads the same video/image again. You can't upload the same file again!

Pretty sure this is bullshit. "Creators" (scammers) love uploading the same content over and over again without a preview so users accidentally buy the same content multiple times. Nothing OF does is for the benefit of the user.

OFfriend commented 1 year ago

OF has implemented an upload check and can dectect if someone uploads the same video/image again. You can't upload the same file again!

Pretty sure this is bullshit. "Creators" (scammers) love uploading the same content over and over again without a preview so users accidentally buy the same content multiple times. Nothing OF does is for the benefit of the user.

I accidentally bought the same content multiple times. It has the same URL and same MD5 hash. OF let them sell the same Files again.

dballs6666 commented 1 year ago

I know it doesn't come much to the topic but did anyone find an alternative to download the new from onlyfans? I have tried with some that have the DRM activated but I have not found a way to download the video successfully, if someone found a way to do it I would greatly appreciate it.

deadbeatdandylyon commented 1 year ago

I use OBS to screen record if it's really that much of a must

dballs6666 commented 1 year ago

I use OBS to screen record if it's really that much of a must

It is an option, but I was trying to find a way to download directly from onlyfans and not by screen recorder. Anyway thanks for answering

deadbeatdandylyon commented 1 year ago

I use OBS to screen record if it's really that much of a must

It is an option, but I was trying to find a way to download directly from onlyfans and not by screen recorder. Anyway thanks for answering

Yeah i think everyone is looking for a way, there is something that someone has created on a forum site but nothing automated at the moment, i'm also waiting for someone to come up with a workaround that's simple to use

dballs6666 commented 1 year ago

Utilizo OBS para grabar en pantalla si es realmente imprescindible.

Es una opción, pero estaba tratando de encontrar una manera de descargar directamente desde onlyfans y no mediante un grabador de pantalla. De todos modos gracias por responder

Sí, creo que todo el mundo está buscando una manera, hay algo que alguien ha creado en un sitio de foro pero nada automatizado en este momento, también estoy esperando que alguien encuentre una solución que sea fácil de usar.

Do you have the forum link maybe? I'm not picky, it doesn't matter if it's not automated like the scraper, I just want to find a way to be able to download the new stuff. I also heard that it is possible with Internet Download Manager but I don't know how it works exactly for OF DRM.

DIGITALCRIMINAL commented 1 year ago

Ohh, I just noticed this, literally now. Was wondering why my script stopped working. I'll look at it now.

deadbeatdandylyon commented 1 year ago

Ohh, I just noticed this, literally now. Was wondering why my script stopped working. I'll look at it now.

Yeah this whole DRM thing put a stop into a lot of things, also even if a creator turns drm off as long as there is one Drm video in the page it stops from scraping in case that was not mentioned. hope there is something you can do to help

DIGITALCRIMINAL commented 1 year ago

Yeah, I've gotten past WV DRM before in a different project, so I just have to apply it here.

OFfriend commented 1 year ago

Maybe the Android Studio Emulator WV Keys are working? 🤣🤣

misterscraper commented 1 year ago

@DIGITALCRIMINALS is there a paywall bypass?

Bearded-Beard commented 1 year ago

@DIGITALCRIMINALS is there a paywall bypass?

You can't get shit for free (well you can, but its not stuff that would normally cost money) not unless you can hack into the actual storage servers

all this script does, is download stuff you've paid/subscribed to nothing more.

So I've not been having an issue with running old script, I have a feeling its just skipping the DRM content atm, but I've unsubbed or let creators know I'll be unsubbing and giving the reason, most have disabled the drm after that.

avekifes commented 1 year ago

So is DRM the definitive reason why the script hangs on messages?

PsychoSid commented 1 year ago

For me the latest version hangs on the messages.

I have an older backup though which still works and still downloads everything

[tool.poetry.dependencies]
python = "^3.10 <3.12"
requests = "^2.26.0"
ultima-scraper-api = "0.1.4"
ultima-scraper-renamer = "0.1.3"
ultima-scraper-collection = "0.1.4"

Is what I have in the older pyproject.toml

ymmv

DIGITALCRIMINAL commented 1 year ago

Maybe the Android Studio Emulator WV Keys are working? roflrofl

It does lol, I used Android Studio Emu for the keys :skull:

Lil update: I managed to successfully decrypt content locally, now I just have to put this in a nice function and figure out how to make this user friendly.

OFfriend commented 1 year ago

Maybe the Android Studio Emulator WV Keys are working? roflrofl

It does lol, I used Android Studio Emu for the keys 💀

Wow epic fail! But this is very good news! Hey, at least they don't use the same KID for every video. (you maybe remember) 🤣

ghost commented 1 year ago

Awesome work DIGITALCRIMINALS. If adding keys and automated decryption to the project isn't viable (due to risk of patching etc.) then maybe we could at least get a list of steps to follow to manually decrypt ourselves 🙏. I got half way through the process (first time doing anything with DRM) but wasn't 100% sure the license url was the right one, and whether I might get my account banned if I make incorrect requests.

Side note: I'm still using the last pre-UltimaScraper code and it seems to just skip DRM content and download everything else fine.

Jarsky commented 1 year ago

OF has implemented an upload check and can dectect if someone uploads the same video/image again. You can't upload the same file again!

Pretty sure this is bullshit. "Creators" (scammers) love uploading the same content over and over again without a preview so users accidentally buy the same content multiple times. Nothing OF does is for the benefit of the user.

I accidentally bought the same content multiple times. It has the same URL and same MD5 hash. OF let them sell the same Files again.

Yup, I wish there was an easy way to give feedback to OnlyFans for us legitimate buyers but clearly they favor their creators more than us the customer.

They should have thumbnails on video content, like a YouTube thumbnail...so you visually see if its one youve bought before..or if its the same file being referenced youve already unlocked before, it should warn you you already own it. Additionally when theres multiple videos, it should tell you the length of the videos. Too many times buying packs and its like 3 x 8 second clips zzz.

When creators are charging these kind of prices with no thumbnails or idea how long videos are, it makes us far less likely to buy them. image image


Anyway back on topic. I'm still using the v7.6.1 OF Scraper because UltimaScraper just constantly hangs. Last updated it a few days ago and tried it again and the same thing. The hanging was occuring before the DRM announcement. The old build skips the DRM content and continues on happily, however it would be nice to be able to grab this; as a few of my favorite girls have switched it on, who I mainly use the scraper for anyway.

Primarily because OnlyFans platform sucks balls. Video quality constantly drops to 240p and have to manually change it back (I have 4Gbps fiber), and they dont even have basic functions like loop, or like theatre view (make it a large % of the browser window)....its either small af, or full screen. For how much $$$ OF are making off these creators, their development is absolutely atrocious. Its amazing so many girls stick with them given how bad their platform is, how many issues they have with getting paid, and the lack of customer support even to the creators.

OFfriend commented 1 year ago

Awesome work DIGITALCRIMINALS. If adding keys and automated decryption to the project isn't viable (due to risk of patching etc.) then maybe we could at least get a list of steps to follow to manually decrypt ourselves 🙏. I got half way through the process (first time doing anything with DRM) but wasn't 100% sure the license url was the right one, and whether I might get my account banned if I make incorrect requests.

Side note: I'm still using the last pre-UltimaScraper code and it seems to just skip DRM content and download everything else fine.

Yes, getting banned was my concern as well. anystream/streamfab limits the number of downloads from netflix/prime.

A valid AnyStream license is limited to approximately 280 downloads per week to avoid being blocked by your streaming provider.

DonaldTPP commented 1 year ago

OF has implemented an upload check and can dectect if someone uploads the same video/image again. You can't upload the same file again!

Pretty sure this is bullshit. "Creators" (scammers) love uploading the same content over and over again without a preview so users accidentally buy the same content multiple times. Nothing OF does is for the benefit of the user.

I accidentally bought the same content multiple times. It has the same URL and same MD5 hash. OF let them sell the same Files again.

Yup, I wish there was an easy way to give feedback to OnlyFans for us legitimate buyers but clearly they favor their creators more than us the customer.

They should have thumbnails on video content, like a YouTube thumbnail...so you visually see if its one youve bought before..or if its the same file being referenced youve already unlocked before, it should warn you you already own it. Additionally when theres multiple videos, it should tell you the length of the videos. Too many times buying packs and its like 3 x 8 second clips zzz.

When creators are charging these kind of prices with no thumbnails or idea how long videos are, it makes us far less likely to buy them. image image

Anyway back on topic. I'm still using the v7.6.1 OF Scraper because UltimaScraper just constantly hangs. Last updated it a few days ago and tried it again and the same thing. The hanging was occuring before the DRM announcement. The old build skips the DRM content and continues on happily, however it would be nice to be able to grab this; as a few of my favorite girls have switched it on, who I mainly use the scraper for anyway.

Primarily because OnlyFans platform sucks balls. Video quality constantly drops to 240p and have to manually change it back (I have 4Gbps fiber), and they dont even have basic functions like loop, or like theatre view (make it a large % of the browser window)....its either small af, or full screen. For how much $$$ OF are making off these creators, their development is absolutely atrocious. Its amazing so many girls stick with them given how bad their platform is, how many issues they have with getting paid, and the lack of customer support even to the creators.

7.6.1 works a treat when I occasionally use it remotely. Even though it skips story content, it's usually just censored advertising but I think the base model should be built off of 7.6.1 seeing as that it's most effective when it comes to fast scraping. I've not had a run in with DRM content yet but it would be nice if @DIGITALCRIMINALS used version 7.6.1 as a building foundation but I do understand for the need to go forward with something else.

WellSomething commented 1 year ago

OF has implemented an upload check and can dectect if someone uploads the same video/image again. You can't upload the same file again!

Pretty sure this is bullshit. "Creators" (scammers) love uploading the same content over and over again without a preview so users accidentally buy the same content multiple times. Nothing OF does is for the benefit of the user.

I accidentally bought the same content multiple times. It has the same URL and same MD5 hash. OF let them sell the same Files again.

Yup, I wish there was an easy way to give feedback to OnlyFans for us legitimate buyers but clearly they favor their creators more than us the customer. They should have thumbnails on video content, like a YouTube thumbnail...so you visually see if its one youve bought before..or if its the same file being referenced youve already unlocked before, it should warn you you already own it. Additionally when theres multiple videos, it should tell you the length of the videos. Too many times buying packs and its like 3 x 8 second clips zzz. When creators are charging these kind of prices with no thumbnails or idea how long videos are, it makes us far less likely to buy them. image image Anyway back on topic. I'm still using the v7.6.1 OF Scraper because UltimaScraper just constantly hangs. Last updated it a few days ago and tried it again and the same thing. The hanging was occuring before the DRM announcement. The old build skips the DRM content and continues on happily, however it would be nice to be able to grab this; as a few of my favorite girls have switched it on, who I mainly use the scraper for anyway. Primarily because OnlyFans platform sucks balls. Video quality constantly drops to 240p and have to manually change it back (I have 4Gbps fiber), and they dont even have basic functions like loop, or like theatre view (make it a large % of the browser window)....its either small af, or full screen. For how much $$$ OF are making off these creators, their development is absolutely atrocious. Its amazing so many girls stick with them given how bad their platform is, how many issues they have with getting paid, and the lack of customer support even to the creators.

7.6.1 works a treat when I occasionally use it remotely. Even though it skips story content, it's usually just censored advertising but I think the base model should be built off of 7.6.1 seeing as that it's most effective when it comes to fast scraping. I've not had a run in with DRM content yet but it would be nice if @DIGITALCRIMINALS used version 7.6.1 as a building foundation but I do understand for the need to go forward with something else.

I agree, 7.6.1 still works for me except with the caveat above, I can't even make Ultima Scrapper get going and I followed all the steps to set i up.

ghost commented 1 year ago

7.6.1 works a treat when I occasionally use it remotely. Even though it skips story content, it's usually just censored advertising but I think the base model should be built off of 7.6.1 seeing as that it's most effective when it comes to fast scraping. I've not had a run in with DRM content yet but it would be nice if DIGITALCRIMINALS used version 7.6.1 as a building foundation but I do understand for the need to go forward with something else.

All of these comments should probably go in a different thread but I thought I'd just reply that I'm using the newest commit before the UltimaScraper migration, which is aa8bc84e39922c7c33ca970d2d731bf9696092af. It works better than the 7.6.1 from the releases page and it downloads stories. I've only made small changes to anywhere max_attempts is used as there are a few rare cases where the script ends up in loop looking for missing content or something and my IP gets rate limited by OF which can be concerning. Wasn't able to get UltimaScraper working when I tried a while ago but should maybe give it a go with the latest code.

Jarsky commented 1 year ago

I agree, 7.6.1 still works for me except with the caveat above, I can't even make Ultima Scrapper get going and I followed all the steps to set i up.

Yeah i've tried many builds of UltimaScraper. I'm using Docker so I just build it in there. But it hangs every time even before DRM protection.

ScarlettHaze commented 1 year ago

Simple:

import base64, requests, sys, xmltodict from pywidevine.cdm import cdm, deviceconfig from base64 import b64encode from pywidevine.getPSSH import get_pssh from wvdecrypt import WvDecrypt

pssh = input('\nPSSH: ') lic_url = input('License URL: ')

headers = {

INSERT YOUR HEADERS HERE FROM THE LICENSE REQUEST

}

def WV_Function(pssh, lic_url, cert_b64=None): wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic)
widevine_license = requests.post(url=lic_url, data=wvdecrypt.get_challenge(), headers=headers) license_b64 = b64encode(widevine_license.content) wvdecrypt.update_license(license_b64) Correct, keyswvdecrypt = wvdecrypt.start_process() if Correct: return Correct, keyswvdecrypt
correct, keys = WV_Function(pssh, lic_url)

print() for key in keys: print('--key ' + key)

use that with pywidevine and you can get the keys, then you can decrypt the audio and video streams and put them together with ffmpeg.
datawhores commented 1 year ago

Maybe the Android Studio Emulator WV Keys are working? roflrofl

It does lol, I used Android Studio Emu for the keys :skull:

Lil update: I managed to successfully decrypt content locally, now I just have to put this in a nice function and figure out how to make this user friendly.

online cdms also work currently

stubblesticker commented 1 year ago

print() for key in keys: print('--key ' + key)

I find your lack of f-strings disturbing

DIGITALCRIMINAL commented 1 year ago

Sorry that it's taking long. I was working on several other big commits before I had to do this.

I already placed my code here:

https://github.com/DIGITALCRIMINALS/UltimaScraperAPI/blob/main/ultima_scraper_api/apis/onlyfans/classes/only_drm.py

Honestly at this point, I'm done for now. I'm archiving this scraper and rebuilding it to be something more advanced. I don't want to work with Sqlite anymore. I've moved onto Postgres for the goal of scraping absolutely everything. I don't want to add backwards compatibility, there's too many features, etc.

I just want to restart everything.

Sorry. You guys can use other scrapers.

https://github.com/datawhores/ofscraper https://github.com/k0rnh0li0/onlyfans-dl https://github.com/montroly/fansyloader

BlackDragon37 commented 1 year ago

Sorry that it's taking long. I was working on several other big commits before I had to do this.

I already placed my code here:

https://github.com/DIGITALCRIMINALS/UltimaScraperAPI/blob/main/ultima_scraper_api/apis/onlyfans/classes/only_drm.py

Honestly at this point, I'm done for now. I'm archiving this scraper and rebuilding it to be something more advanced. I don't want to work with Sqlite anymore. I've moved onto Postgres for the goal of scraping absolutely everything. I don't want to add backwards compatibility, there's too many features, etc.

I just want to restart everything.

Sorry. You guys can use other scrapers.

https://github.com/datawhores/ofscraper https://github.com/k0rnh0li0/onlyfans-dl https://github.com/montroly/fansyloader

How do I add the code to the scraper, if I can get it to work?

sisabe13 commented 1 year ago

guys there are many ways to make money with this business. If you would like to work on this you can write to me on telegra. I go out like @sisabbe