GithubHelp home page GithubHelp logo

k0rnh0li0 / onlyfans-dl Goto Github PK

View Code? Open in Web Editor NEW
752.0 51.0 216.0 2.49 MB

OnlyFans content downloader

License: GNU General Public License v3.0

Python 100.00%
onlyfans media-downloader python web-scraper

onlyfans-dl's People

Contributors

48763 avatar anonpatch avatar coinsearchr avatar cptpiepmatz avatar digitalnull avatar evgom avatar forsakendaemon avatar jinseobhong avatar k0rnh0li0 avatar livkx avatar lynndixon avatar ontionas avatar r56789-svg avatar spreagit avatar th3k1n91 avatar yonn-trimoreau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onlyfans-dl's Issues

SyntaxError: invalid syntax

File "./of.py", line 186
dwnld_stats = f"{cur_count}/{total_count} {round(((cur_count / total_count) * 100))}% " +
^
SyntaxError: invalid syntax

the arrow is pointing to the 2nd ". I've tried removing and recreating both ", but no dice. Any ideas?

Python 2.7.18
Linux

SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC

randomly get this error, usually on larger files like videos.
resulting in a corrupt file that's skipped next time script is launched.
image

ideas for solution is either to avoid the error somehow.
or possible workarounds
1; check filesize and retry if smaller?
1; download with appended "_temp" on filename and then rename it only on completed download.

Route not found Firefox 85

Seems to be an issue with either OF api or Firefox85, get a route not found error when running since latest firefox update. user agent is "Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0". Additionally I definitely have the correct token as the tool only throws this message after the "Getting user auth info" and the "Getting target profile info" readouts.

Download media shared via messages

Sometime creators share links via messages (after e.g.: giving a tip).

It seems these are currently not being downloaded. Would it be possible to add this feature?
Hopefully messages are accessible via current APIs & authtoken, i.e.: nothing extra is required other than scanning messages for media?

Cant run it

Hello there, great repo, but im totally new at python and I would need some help to run the strings, I got all the values needed, but everytime I try to run it I get a syntax error. what command should I type to run it? I got Python 3.9
Thank you for your help !

See README for instructions.

I have opened the issue but it was closed without providing any solution. So was hoping to get an answer for this one atleast.

I always get this error. Can anyone tell me where exactly I need to post
<profile> <accessToken> in the script? what else are we need to insert in the script?

Thanks!

image

module import request

  File ".\onlyfans-dl.py", line 16, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

When I run python3 onlyfans-dl.py I get that error in return. Not sure why but line 16 says import requests, and it looks fine to me. But that return error keeps popping up.

ERROR: Acess denied and logout

Been using this without issue for a few weeks, and all of a sudden I started getting ERROR: Access denied. messages and my session would be logged out

Access Tokens Giving "Access Denied"

Things were working fine for a week or two. Starting a couple days ago, anytime I attempted to run the script I'd get "ERROR: Access denied." after "Getting user auth info...".

Once this happens, my OnlyFans tab also gets automatically signed out, required me to sign back in.

Not sure if the API has changed or has been removed, but this script is currently unusable for me.

Requests Module

I tried to run this module and the first error I got was "ModuleNotFoundError: No module named 'requests'" Then after I downloaded requests it ran past the intro screen and this is now the error I am getting.
Getting user auth info... Traceback (most recent call last): File "D:\Library\Downloads\onlyfans-dl-master\onlyfans-dl.py", line 148, in <module> USER_INFO = get_user_info("customer") File "D:\Library\Downloads\onlyfans-dl-master\onlyfans-dl.py", line 98, in get_user_info info = api_request("/users/" + profile).json() File "D:\Library\Downloads\onlyfans-dl-master\onlyfans-dl.py", line 85, in api_request return requests.get(URL + API_URL + endpoint, AttributeError: module 'requests' has no attribute 'get'

JSONDecodeError

Hi,

great tool, was working perfectly up until today. I started getting the following error:

Traceback (most recent call last):
File "F:\PycharmProjects\onlyfans-dl-master\onlyfans-dl.py", line 200, in
posts = api_request("/users/" + PROFILE_ID + "/posts", getdata={"limit": POST_LIMIT})
File "F:\PycharmProjects\onlyfans-dl-master\onlyfans-dl.py", line 61, in api_request
list_base = requests.get(URL + API_URL + endpoint,
File "F:\Program Files\Python39\lib\site-packages\requests\models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "F:\Program Files\Python39\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "F:\Program Files\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "F:\Program Files\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Process finished with exit code 1

Not sure if it is important, or not, but Iam using Opera with the following API header:

API_HEADER = {
"Accept": "application/json, text/plain, /",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OPR/73.0.3856.344",
"Accept-Encoding": "gzip, deflate"
}

EDIT:
Tried running the whole in debug. Followed it until I hit the line on decoder.py that produces the error to have a look what was causing it.
The string "s" that produced the error looked like some HTML response with 504 Gateway timeout...

So assuming it was something with regards to bad connection / OF responsivity, I tried running the whole thing like 10-15 minutes later, and it worked - no errors anymore... Sorry for the false alarm :D

Feel free to close the issue.

Usage: ./onlyfans-dl <xxx> <xxx>

I've downloaded requests and inserted tokens, program closes after 1 sec, when I open trough CMD i get this message

C:\Users\xxx\Desktop\OF>dl.py
Usage: ./onlyfans-dl
See README for instructions.

OSError: [Errno 63] File name too long

Downloading avatar...
Traceback (most recent call last):
  File "onlyfans-dl.py", line 256, in <module>
    download_public_files()
  File "onlyfans-dl.py", line 123, in download_public_files
    download_file(PROFILE_INFO[public_file], path)
  File "onlyfans-dl.py", line 154, in download_file
    with open("profiles/" + PROFILE + path, 'wb') as f:
OSError: [Errno 63] File name too long: 'profiles/thesharok/avatar/atwg3mn4jppu0kprsqoyuc7fhd4epmgi1586293483.jpg?Tag=2&Expires=1647237840&Signature=Q4UE~o7Sr~gnNfEaMwXrUZYvXWoi1qqiKl4XTTqgoKFVVWTW7vvwyZyMujB8ym6gp4hyRFHphBtLg0TFY6fFQDrSK3dQvb60raDS16SxD4BFp2VNgWoRvPFRdWp549H~xO0ZNr4z6Vo2OpOYndae2D7TYj3GF1fafCQT4FcbZ4SYty01rCSOBKZKl28zh2cNAvC6nXbFAKmjloBuEehoFqlU7MlL-DlBGdwpWPDFTiP832NallYrz~XNCphjzmZBVEQ0Ovy0alvPbqQcBnyaRzGvbks3vtVPQ6IKVi9SSJoof0enu7r8Hj9sPHSylmuwPa2qfwkGI74~8KKNozh-Mg__&Key-Pair-Id=APKAJZU4IULC2OKULHGA'

Hi, I've been using this very nifty program for a while now and have scraped a few profiles I subscribed. However, this one recent profile I was trying to scrape, keep giving me this 'file name too long' error and I've looked at the python script but I'm too much of a beginner programmer that I am not sure what to do to fix this error. Python throws this error up and then stops downloading. Can you quickly help me with this whenever you have time?

list index out of range

i am getting:
Saving profile info...
Finding photos...
Traceback (most recent call last):
File "onlyfans-dl.py", line 225, in
photo_posts = api_request("/users/" + PROFILE_ID + "/posts/photos", getdata={"limit": POST_LIMIT})
File "onlyfans-dl.py", line 78, in api_request
beforePublishTime = list_extend[posts_num-1]['postedAtPrecise']
IndexError: list index out of range

No default program detected

For some reason (after using the program once), it now asks me to use a program to "open" the .py??
I haven't changed the program folder from its original location or anything, and I have Python installed plus the requests stuff update as well. I did scraped a profile a few days ago, but now it's asking me for a default program and I don't know what to do. Is the command syntax wrong or something?
https://prnt.sc/10skjgn

ModuleNotFoundError

Hi,
When I run the code in cmd, it returns:

C:\Users\user\Documents\ONF\New folder\onlyfans-dl>onlyfans-dl.py skye-fetish knc41dhr7rdsno8u07o38m4e11
Traceback (most recent call last):
File "C:\Users\user\Documents\ONF\New folder\onlyfans-dl\onlyfans-dl.py", line 16, in
import requests
ModuleNotFoundError: No module named 'requests'

Any help would be appreciated - I am pretty bad with coding and i've never used python.

What´s next?

What i need to do after this screen?
Microsoft Windows [Version 10.0.19041.685]
(c) 2020 Microsoft Corporation. All rights reserved.

H:\H-Downloads\onlyfans-dl-master\onlyfans-dl-master>H:/H-Downloads/onlyfans-dl-master/onlyfans-dl-master/onlyfans-dl.py
Usage: ./onlyfans-dl
See README for instructions.

H:\H-Downloads\onlyfans-dl-master\onlyfans-dl-master>

image

@k0rnh0li0

Access denied

everything I pasted as given instructions and ran the script + after following error my account got logged out : (

~ I AM THE GREAT KORNHOLIO ~
~  ARE U THREATENING ME??  ~
~                          ~
~    COOMERS GUNNA COOM    ~
~    HACKERS GUNNA HACK    ~

Getting user auth info...

ERROR: Access denied.

error

whenever i try to run it i get this error

onlyfans-dl-master\onlyfans-dl.py", line 16, in
import requests
ModuleNotFoundError: No module named 'requests'

crash when downloading many posts

tbh no idea what is causing this error.
with troubleshooting came to the conclusion it only happens to creators with many posts (because of 100 limit?)

File "D:\py\onlyfans-dl.py", line 225, in <module> photo_posts = api_request("/users/" + PROFILE_ID + "/posts/photos", getdata={"limit": POST_LIMIT}) File "D:\py\onlyfans-dl.py", line 61, in api_request list_base = requests.get(URL + API_URL + endpoint, File "C:\Users\daxmo\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "C:\Users\daxmo\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\daxmo\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\daxmo\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Script opens then closes

To start I have never used Python. I could be doing something simple wrong but when I launch the script with Python 39 the box pops up for less than a second and closes. I can open it in IDLE and run it and i get
Screenshot 2021-02-27 161827
but I haven't the slightest clue what could be causing this. I recognize this could be a problem with my python or something else not related to the scrip but I hope those with experience could help my situation. Any help is appreciated.

Upgrade: Multithreading

I want faster download times so I am going to mess around with multithreading. I've already gotten a user's download time from about 86 seconds to 36 seconds, so that is a pretty good decrease

I think I can increase the speed of the FInding photos... part of the code because a bunch of time is spent waiting for the server to respond.

I'll post some updates here and link the PR when I make it.

access Token

My session's auth token i copy, but look in code, and don't see where is need to past him, and this program download all post profile or only 100 ?

[Feature request] Support updating dumps

Hey there. Thanks for the script. The Readme doesn't say anything about whether or not this will duplicate downloads? Just want to keep a folder up to date without redownloading everything.
I didn't see many data files saved, so could you save a JSON of the files that were already downloaded?
If it contained the following data, that would be great!

filename:
path:
date_downloaded:
source_url:

Question: Save Directory

Hello,

I've just used this script but I've been unable to find where photos and videos have been saved.

What would be the default directory and can this be changed at all?

Only Downloading 100 Posts

When i use the script, it just downloading from 100 posts, and if im redownload it to get more post it just saying profile exist not downloading more posts

0 posts found

Not sure what is wrong, I get:

Saving profile info...
Finding posts...
ERROR: 0 posts found.

I am not sure about the form of the user, I am using the u... format.

Possible features: more options and logs

First off, great library. I've been ripping tons of pictures and videos.

It might be helpful in some cases to be able to specify what type of content you want to download (pictures or videos). Some users have a ton of crap pictures/ videos and I might just want one or the other. Though the more data the better, I guess. Just a thought

Another thing I like to do is sort the videos afterwards into folders for research purposes. This breaks the feature which does not re download content you already have. It might be helpful to either read that list from a log file in that user's directory, or allow the script to traverse into directories to find file names

Access Token & Profile ID Placing || Help a Noobie Here

Hey, first of all, thanks for the code.

I'm a noobie in Python. I have grabbed and placed UserAgent but I don't know where to post the Access Token & Profile in the code?

Can anyone help me with the screenshots? (If Possible.) or tell me where should I post access token and Profile ID in script exactly?

Thanks!

image

Access denied.

Not sure if you checked the recent version of OnlyFans, it seems they updated their services.

Everytime I try to fetch data it tells me "Error: Access denied." and logs me out of the Website.

Could you maybe check that? So far: Thank you so much for the great work! Amazing! :)

No longer works

Even though I go and check the accessToken every time, the CMD code always returns "ERROR: Access Denied." Then OnlyFans forcefully logs me out. I've retried it several times with the same results.

This must be because of their update with their new Terms of Service.

Limit 100 post

Why 100 post as a limit? what if the user has more than 100 post?

Completely Lost

I got my user agent, opened the onlyfans-dl.py file in VS Code and changed it.
I opened command prompt as an administrator.
I made sure to run [python -m pip install requests]
I cd'd to the location of onlyfans-dl.py
I ran the command [onlyfans-dl.py sayanozzy k3v6c845ucuodj7fvo71plrmsq]
It opened a new window for half a second that said

Usage ./onlyfans-dl.py
See README for instructions

I looked through it again and repeated all the steps but this time I made a .bat file that included the line [onlyfans-dl.py sayanozzy k3v6c845ucuodj7fvo71plrmsq] but the same thing happened again.

Access denied

I do all steps what you mentioned on readme file. I entered my user agent in source code. Get auth token form browser and when i m trying to call your script it says:

Getting user auth info...
ERROR: Access denied.

When i turn back to browser(which i logged in before) and click anywhere on onlyfans it turns back me to the login screen. So i think the session has gone on browser too.

access denied

I did all the instructions, got my token, logged in, changed user-agent to mine and I get

access denied

Download images using filename rather than media ID to avoid duplicates

Hi there, great program, been running well so far.

I've noticed that the images are downloaded using the media ID (eg 133742069) rather than the image name (2098x3088_9fd75ce7fcf595b5008759544cf0d0fe.jpg) and this results in a lot of duplicates. I'm not entirely sure how OF does it but I've downloaded a profile and used a duplicate finder tool. Cleared out a bunch of files, and then re-ran onlyfans-dl and the files re-appeared.

Just wondering how easily this can be changed?

help please?

new to python could someone help me get this working? plez

path.rfind is NoneType

Hi, first thank you a lot I have been able to use the script for an account.
I'm trying again with another one and getting this error:

Traceback (most recent call last): File "c:/Users/.../script.py", line 256, in <module> download_public_files() File "c:/Users/.../script.py", line 118, in download_public_files id = get_id_from_path(source) File "c:/Users/.../script.py", line 159, in get_id_from_path last_index = path.rfind("/") AttributeError: 'NoneType' object has no attribute 'rfind'

I get correctly authenticated and the folder structure gets created. This appears after downloading the avatar.

Unexpected character after line continuation character

I am stuck, when I run the python script I get the following error message:

SyntaxError: unexpected character after line continuation character
>>> \onlyfans-dl.py acc-name token
  File "<stdin>", line 1

Can you help me out with this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.