b3yc0d3 / rule34Py

python api wrapper for rule34.xxx rest api
https://pypi.org/project/rule34Py/
GNU General Public License v3.0
24 stars 6 forks source link

_random_post_id() returns KeyError: 'id' #4

Closed RedstonedLife closed 2 years ago

RedstonedLife commented 2 years ago

So I'm using rule34Py 1.4.6 (hopefully the latest cause I downloaded it using pip install) When using rule34Py.random_post() it will throw a KeyError: 'id' exception from self._random_post_id() now I went through the code the simplest fix is to use __base_url__ in RANDOM_POST instead of __api_url__ because rule34 uses the base url for random posts not the API. That fixes the issue at hand.

b3yc0d3 commented 2 years ago

Sorry that i haven't done anything 'till now I was on vacation