sj-dan/OpenSea-NFT-Stealer

[BUG] - JSONDecodeError

Closed this issue · 2 comments

Describe the bug
A clear and concise description of what the bug is.
this used to work, but today, trying to run python3 opensea.py and getting the following error.

Am i getting throttled from the api?

The collection you were trying to download
alienfrensnft

Expected behavior
A clear and concise description of what you expected to happen.
I expected to see the command run and pull in all of the collection images and data.

Terminal output (please show the error that the console showed)

Beginning download of "alienfrensnft" collection.

Traceback (most recent call last):
  File "/Users/tech/Code/steal/OpenSea-NFT-Stealer/opensea.py", line 106, in <module>
    data = json.loads(requests.get(f"https://api.opensea.io/api/v1/assets?order_direction=asc{token_ids}&limit=50&collection={CollectionName}&format=json", headers=headers).content.decode())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/Library/Frameworks/Python.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 "/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)

Check out a pull request that fixes this: #37

This issue closed by #37, commit 15d14eb