taux1c / onlyfans-scraper

A tool that allows you to print to file all content you are subscribed to on onlyfans including content you have unlocked or has been sent to you in messages.
MIT License
289 stars 34 forks source link

requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #76

Open 4DeepThought2 opened 8 months ago

4DeepThought2 commented 8 months ago

Describe the bug Attempting to download a set for a free user.

To Reproduce Start downloads of a certain user.

Expected behavior Download the users content.

Issue: I have not attempted to look at the code yet to edit it to get the json payload to see what its doing, but:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Z:\OnlySnap\OnlySnap.py", line 816, in <module>
    SELECTED_MODELS = select_sub()
                      ^^^^^^^^^^^^
  File "Z:\OnlySnap\OnlySnap.py", line 308, in select_sub
    subscribes_count = user_me()["subscribesCount"]
                       ^^^^^^^^^
  File "Z:\OnlySnap\OnlySnap.py", line 225, in user_me
    me = api_request("/users/me").json()
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "Z:\OnlySnap\OnlySnap.py", line 162, in api_request
    num_posts = len(response.json()) if isinstance(response.json(), list) else 0
                                                   ^^^^^^^^^^^^^^^
  File "Z:\OnlySnap\venv\Lib\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)

Desktop (please complete the following information):

taux1c commented 8 months ago

Sorry man I don't do anything at all with this anymore. Way too much work for nothing. The api calls are too outdated to be able to give you a fix. Fixing this would require a total overhaul of most calls.