Open RedCIaws opened 2 years ago
Thank you for the report! Could you please give me the name of the subreddit you used?
It's a bit embarrassing... To give you some context I m currently trying to make my own discord bot just for fun. One of the commands I implements call your lib to pull some spicy content from reddit. Some posts are image, gif, or video. And some of the video posts use the Redgifs platform for sharing. Anyway you can try to reproduce this issue with subreddit like r/boobs or r/gonewild.
Thank you! I will look at the error and let you know when it's fixed.
In base.py line 87 : contenttext = post[randompost]["data"]["media"]["reddit_video"]["scrubber_media_url"] seems to trigger an error when processing redgif video, as I understand there is no reddit_video attribute. Feel free to ask for more information if needed, it's my first issue on GitHub and I'm not sure about what to put in the description of the issue.
I also noticed that when querying a random post for a subreddit it always takes 25 posts, it's not an issue and it's probably to get better performances but I could be a nice addition to allow users to have an optional param for the number of posts queried. Nice work anyway.