CloudBotIRC / CloudBot

CloudBot - The simple, fast, expandable, open-source Python IRC Bot!
GNU General Public License v3.0
273 stars 252 forks source link

ISBNdb Plugin #265

Closed K0HAX closed 5 years ago

K0HAX commented 7 years ago

I created a plugin to allow users to type ".isbn " and return information about the book from http://isbndb.com.

knight-ryu12 commented 7 years ago

yup, But It still requires json module for getting dict from json str.

2017/04/18 午前7:10 "Andy Edwards" notifications@github.com:

@edwardslabs commented on this pull request.

In plugins/isbn.py https://github.com/CloudBotIRC/CloudBot/pull/265#discussion_r111833165:

+import cloudbot + +@hook.on_start() +def load_api(bot):

this could be changed to

data = resp.json()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CloudBotIRC/CloudBot/pull/265#pullrequestreview-33102917, or mute the thread https://github.com/notifications/unsubscribe-auth/ALa_EzGWXCXf1LElNvFgA-yqYij05iifks5rw-NmgaJpZM4M5X4B .

daboross commented 7 years ago

Requests has that built in though, with the response.json() method - no need to depend directly on json?

K0HAX commented 7 years ago

I just pushed an update using response.json(), I've tested that method and it worked.