Voldrix / onlyfans-dl-2

OnlyFans content downloader v2
GNU General Public License v3.0
168 stars 24 forks source link

Crash when downloading #72

Closed ghost closed 10 months ago

ghost commented 1 year ago

Traceback (most recent call last): File "/Users/roy/Library/Python/3.9/lib/python/site-packages/requests/models.py", line 971, in json return complexjson. loads (self.text, **kwargs) File "/Applications/Xcode. app/Contents/Developer/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/_init __•py", line 346, in loads return _defaultdecoder.decode (s) File "/Applications/Xcode. app/Contents/Developer /Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw decode (s, idx=_w(s, 0) .end() ) File "/Applications/Xcode .app/Contents/Developer/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dl-NAS.py", line 264, in get content ("messages", "chats/" + PROFILE ID + "/messages") File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dI-NAS.py", line 175, in get_content posts = api_request (API_LOCATION, MEDIATYPE) File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dI-NAS.py", line 95, in api_request list_extend = requests.get (API_URL + endpoint, headers=API_HEADER, params=getParams) .json () File "/Users/roy/Library/Python/3.9/lib/python/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError (e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Voldrix commented 1 year ago

I also added a check for this error, so it won't crash the script anymore.

ghost commented 1 year ago

I also added a check for this error, so it won't crash the script anymore.

Script still crashes.

kslibrarygirl exists. Downloading new media, skipping pre-existing. Found 715 posts Downloaded 2 new posts Found 17 archived Downloaded 0 new archived Found 2 stories Downloaded 1 new stories Traceback (most recent call last): File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dl-NAS.py", line 269, in get_content("messages", "/chats/" + PROFILE_ID + "/messages") File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dl-NAS.py", line 186, in get_content posts = posts['list'] TypeError: string indices must be integers

Voldrix commented 1 year ago

more connection error handling added. If you receive a non-200 http response, it will fail but continue instead of exiting

ghost commented 1 year ago

more connection error handling added. If you receive a non-200 http response, it will fail but continue instead of exiting

Still crashes

kslibrarygirl exists. Downloading new media, skipping pre-existing. Found 716 posts Downloaded 1 new posts Found 17 archived Downloaded 0 new archived Found 2 stories Downloaded 1 new stories Traceback (most recent call last): File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dl-NAS.py", line 269, in get_content("messages", "/chats/" + PROFILE_ID + "/messages") File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dl-NAS.py", line 181, in get_content posts = api_request(API_LOCATION,MEDIATYPE) File "/Users/roy/Documents/Scripts/onlyfans-dl/onlyfans-dl-NAS.py", line 103, in api_request list_base['list'].extend(list_extend['list']) UnboundLocalError: local variable 'list_extend' referenced before assignment

ghost commented 1 year ago

Still happens

Voldrix commented 11 months ago

just made a number of changes in regards to various error processing. Try out the new script and see if that works for you.

ghost commented 11 months ago

just made a number of changes in regards to various error processing. Try out the new script and see if that works for you.

TypeError: can only concatenate str (not "int") to str get_content("posts", "/users/" + PROFILE_ID + "/posts") File "//config/onlyfans-dl.py", line 314, in

Voldrix commented 11 months ago

There are not even 314 lines in my script. What are you even doing?

ghost commented 11 months ago

Some of my CD to directory code is added, but that worked fine in the previous version without the latest comits you did, tried your RAW code to make sure it's in the latest comit.

TypeError: can only concatenate str (not "int") to str get_content("posts", "/users/" + PROFILE_ID + "/posts") File "//config/onlyfans-dl.py", line 291, in module

Voldrix commented 11 months ago

I see. the integer to string conversion got lost when I replaced that line. I added it back.

Voldrix commented 10 months ago

this should be fixed. Open a new ticket if you run into it again with the latest version