onlyfans-scraper icon indicating copy to clipboard operation
onlyfans-scraper copied to clipboard

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

Open 4DeepThought2 opened this issue 1 year ago • 1 comments

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):

  • OS: Windows 11 - Python3 virtual environment
  • Browser [e.g. chrome, safari]: N/A
  • Version [e.g. 22] latest

4DeepThought2 avatar Oct 16 '23 18:10 4DeepThought2