k0rnh0li0 / onlyfans-dl

OnlyFans content downloader
GNU General Public License v3.0
772 stars 221 forks source link

simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #173

Closed user01010111 closed 8 months ago

user01010111 commented 2 years ago

Any ideas why the script fails to complete?

Using the latest versions of onlyfans-dl.py and auth.json.

ubuntu@<blah>:~$ ./onlyfans-dl.py <target>

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

x
x
0 | *** Download All Models ***
1 | onlydevx
2 | <target>
Enter number to download model
2
x

onlyfans-dl is downloading content to profiles/<target>!

Saving profile info...
Downloading avatar...
Downloading header...
Finding photos... Traceback (most recent call last):
  File "./onlyfans-dl.py", line 396, in <module>
    photo_posts = get_all_photos(photos)
  File "./onlyfans-dl.py", line 314, in get_all_photos
    extra_img_posts = api_request("/users/" + PROFILE_ID + "/posts/photos",
  File "./onlyfans-dl.py", line 98, in api_request
    list_base = requests.get(URL + API_URL + endpoint,
  File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
SnugglinBunny commented 2 years ago

Why are you passing in < target >? I'm pretty sure that's why you're getting an error because it thinks that's a profile and finds no data.

user01010111 commented 2 years ago

Why are you passing in < target >? I'm pretty sure that's why you're getting an error because it thinks that's a profile and finds no data.

I've substituted the real profile name with that for privacy reasons.

SnugglinBunny commented 2 years ago

Ok well this error means that the response for that model was empty so I would check you have access to their profile and that they actually have posts to download.